Sha256: 07a7a3db05a83f75dea9968e1c8025d9e736068ac23ff4d7bccd15689f12d6f6

Contents?: true

Size: 1.87 KB

Versions: 49

Compression:

Stored size: 1.87 KB

Contents

<%= form_with(model: [:account, (@team unless membership.persisted?), membership], class: 'form', local: true) do |form| %>
  <%= render 'account/shared/forms/errors', form: form %>

  <% if membership.unclaimed? || membership.tombstone? %>
    <div class="grid grid-cols-1 gap-y gap-x sm:grid-cols-6">
      <div class="sm:col-span-3">
        <%= render 'shared/fields/text_field', form: form, method: :user_first_name %>
      </div>

      <div class="sm:col-span-3">
        <%= render 'shared/fields/text_field', form: form, method: :user_last_name %>
      </div>
    </div>
  <% end %>

  <% if membership.tombstone? %>
    <% if cloudinary_enabled? %>
      <%= render 'shared/fields/cloudinary_image', form: form, method: :user_profile_photo_id %>
    <% end %>
  <% end %>

  <%= hidden_field_tag 'membership[role_ids][]', nil %>

  <% Membership.assignable_roles.each do |role| %>
    <% if role.manageable_by?(current_membership.roles) %>
      <div class="flex items-top">
        <%= form.check_box :role_ids, {multiple: true, class: "h-4 w-4 text-blue focus:ring-blue-800 border-slate-300 rounded mt-0.5"}, role.id, nil %>
        <label for="membership_role_ids_<%= role.id %>" class="ml-2 block select-none">
          <%= t('.grant_privileges_of', role_key: t(".fields.role_ids.options.#{role.key}.label")) %>
          <div class="mt-0.5 text-slate-400 font-light leading-normal">
            <%= t(".fields.role_ids.options.#{role.key}.description") %>
          </div>
        </label>
      </div>
    <% end %>
  <% end %>

  <%= render "account/memberships/fields", membership: membership, form: form %>
  <%# 🚅 super scaffolding will insert new fields above this line. %>

  <div class="buttons">
    <%= form.submit t('.buttons.update'), class: "button" %>
    <%= link_to t('global.buttons.cancel'), [:account, @team, :memberships], class: "button-secondary" %>
  </div>
<% end %>

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
bullet_train-1.4.5 app/views/account/memberships/_form.html.erb
bullet_train-1.4.4 app/views/account/memberships/_form.html.erb
bullet_train-1.4.3 app/views/account/memberships/_form.html.erb
bullet_train-1.4.2 app/views/account/memberships/_form.html.erb
bullet_train-1.4.1 app/views/account/memberships/_form.html.erb
bullet_train-1.4.0 app/views/account/memberships/_form.html.erb
bullet_train-1.3.25 app/views/account/memberships/_form.html.erb
bullet_train-1.3.24 app/views/account/memberships/_form.html.erb
bullet_train-1.3.23 app/views/account/memberships/_form.html.erb
bullet_train-1.3.22 app/views/account/memberships/_form.html.erb
bullet_train-1.3.21 app/views/account/memberships/_form.html.erb
bullet_train-1.3.20 app/views/account/memberships/_form.html.erb
bullet_train-1.3.19 app/views/account/memberships/_form.html.erb
bullet_train-1.3.18 app/views/account/memberships/_form.html.erb
bullet_train-1.3.17 app/views/account/memberships/_form.html.erb
bullet_train-1.3.16 app/views/account/memberships/_form.html.erb
bullet_train-1.3.15 app/views/account/memberships/_form.html.erb
bullet_train-1.3.14 app/views/account/memberships/_form.html.erb
bullet_train-1.3.13 app/views/account/memberships/_form.html.erb
bullet_train-1.3.12 app/views/account/memberships/_form.html.erb