bullet_train 1.12.1 → 1.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/concerns/account/invitations/controller_base.rb +5 -0
- data/app/views/account/invitations/_form.html.erb +4 -0
- data/app/views/account/memberships/_form.html.erb +31 -29
- data/app/views/account/memberships/show.html.erb +1 -0
- data/app/views/account/users/_form.html.erb +0 -1
- data/docs/field-partials.md +1 -0
- data/lib/bullet_train/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 359c742c2ad95d55fd469407fac668cbd94d6fd43643c0e1dedd705afaff1564
|
4
|
+
data.tar.gz: 504b342f64b691e89630dde9dd763bbcd9c23056c4fc6437532993e417f0716b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4099fd8c3c38bed877f1844127f998fc2b16d64beb9b4f3ff637f4706c18f8d0fdb74c5b1264c13a1e72b80d98cb0c71be799100f93a903480447562abbe2396
|
7
|
+
data.tar.gz: 0a74b016a9d0d7b027ce2c73cff11abfe6dc341d77854a50dbb127c086188187186c98ed23ed728d867d711c18339f0185c3699ec8dde5f09caa5435fda010a3
|
@@ -124,6 +124,10 @@ module Account::Invitations::ControllerBase
|
|
124
124
|
raise "It looks like you've removed `permitted_fields` from your controller. This will break Super Scaffolding."
|
125
125
|
end
|
126
126
|
|
127
|
+
def permitted_membership_fields
|
128
|
+
raise "It looks like you've removed `permitted_membership_fields` from your controller. This will break Super Scaffolding."
|
129
|
+
end
|
130
|
+
|
127
131
|
def permitted_arrays
|
128
132
|
raise "It looks like you've removed `permitted_arrays` from your controller. This will break Super Scaffolding."
|
129
133
|
end
|
@@ -145,6 +149,7 @@ module Account::Invitations::ControllerBase
|
|
145
149
|
# 🚅 super scaffolding will insert new fields above this line.
|
146
150
|
# 🚅 super scaffolding will insert new arrays above this line.
|
147
151
|
membership_attributes: [
|
152
|
+
*permitted_membership_fields,
|
148
153
|
:user_first_name,
|
149
154
|
:user_last_name,
|
150
155
|
role_ids: []
|
@@ -1,42 +1,44 @@
|
|
1
1
|
<%= form_with(model: [:account, (@team unless membership.persisted?), membership], class: 'form', local: true) do |form| %>
|
2
2
|
<%= render 'account/shared/forms/errors', form: form %>
|
3
3
|
|
4
|
-
<% if membership.unclaimed? || membership.tombstone? %>
|
5
|
-
<div class="grid grid-cols-1 gap-y gap-x sm:grid-cols-6">
|
6
|
-
<div class="sm:col-span-3">
|
7
|
-
<%= render 'shared/fields/text_field', form: form, method: :user_first_name %>
|
8
|
-
</div>
|
9
4
|
|
10
|
-
|
11
|
-
|
5
|
+
<% with_field_settings form: form do %>
|
6
|
+
<% if membership.unclaimed? || membership.tombstone? %>
|
7
|
+
<div class="grid grid-cols-1 gap-y gap-x sm:grid-cols-6">
|
8
|
+
<div class="sm:col-span-3">
|
9
|
+
<%= render 'shared/fields/text_field', form: form, method: :user_first_name %>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div class="sm:col-span-3">
|
13
|
+
<%= render 'shared/fields/text_field', form: form, method: :user_last_name %>
|
14
|
+
</div>
|
12
15
|
</div>
|
13
|
-
|
14
|
-
<% end %>
|
16
|
+
<% end %>
|
15
17
|
|
16
|
-
|
17
|
-
|
18
|
-
|
18
|
+
<% if membership.tombstone? %>
|
19
|
+
<% if cloudinary_enabled? %>
|
20
|
+
<%= render 'shared/fields/cloudinary_image', form: form, method: :user_profile_photo_id %>
|
21
|
+
<% end %>
|
19
22
|
<% end %>
|
20
|
-
<% end %>
|
21
23
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
24
|
+
<%= hidden_field_tag 'membership[role_ids][]', nil %>
|
25
|
+
|
26
|
+
<% Membership.assignable_roles.each do |role| %>
|
27
|
+
<% if role.manageable_by?(current_membership.roles) %>
|
28
|
+
<div class="flex items-top">
|
29
|
+
<%= form.check_box :role_ids, {multiple: true, class: "h-4 w-4 text-primary-500 focus:ring-primary-500 border-slate-300 rounded mt-0.5"}, role.id, nil %>
|
30
|
+
<label for="membership_role_ids_<%= role.id %>" class="ml-2 block select-none">
|
31
|
+
<%= t('.grant_privileges_of', role_key: t(".fields.role_ids.options.#{role.key}.label")) %>
|
32
|
+
<div class="mt-0.5 text-slate-400 font-light leading-normal">
|
33
|
+
<%= t(".fields.role_ids.options.#{role.key}.description") %>
|
34
|
+
</div>
|
35
|
+
</label>
|
36
|
+
</div>
|
37
|
+
<% end %>
|
35
38
|
<% end %>
|
36
|
-
<% end %>
|
37
39
|
|
38
|
-
|
39
|
-
|
40
|
+
<%= render "account/memberships/fields", membership: membership, form: form %>
|
41
|
+
<% end %>
|
40
42
|
|
41
43
|
<div class="buttons">
|
42
44
|
<%= form.submit t('.buttons.update'), class: "button" %>
|
data/docs/field-partials.md
CHANGED
@@ -147,6 +147,7 @@ Certain form field partials like `buttons` and `super_select` can also have thei
|
|
147
147
|
| [`address_field`](/docs/field-partials/address-field.md) | `Address` | | | | Adds a block of address fields. On change, its country super-select auto-updates the state/province/region super-select and postal/zip code field label. |
|
148
148
|
| `boolean` | `boolean` | | `assign_boolean` | | |
|
149
149
|
| [`buttons`](/docs/field-partials/buttons.md) | `string` | Optionally | `assign_checkboxes` | | |
|
150
|
+
| `checkbox` | `boolean` | | `assign_boolean` | | |
|
150
151
|
| `image` | `string` or `attachment`* | | | | |
|
151
152
|
| `color_picker` | `string` | | | [pickr](https://simonwep.github.io/pickr/) | |
|
152
153
|
| `date_and_time_field` | `datetime` | | | [Date Range Picker](https://www.daterangepicker.com) | |
|
data/lib/bullet_train/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.12.
|
4
|
+
version: 1.12.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|