bullet_train 1.3.22 → 1.3.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 347c8bc91b3b401f88551f4e20464258313548a54bbcfc8568088cfb3eea401b
4
- data.tar.gz: f12fd053f264a5cd60c9789195cd0ced4b171febfa96bfbdd2bf3b020fec6241
3
+ metadata.gz: 69fb638be13d9c3fbdba294e923647b5fb0829f91310cd6b074392a9cccdb1b9
4
+ data.tar.gz: 5a04389c3d325a38daade6b53ddd76da939c2fd1600d431954c054da346aafc3
5
5
  SHA512:
6
- metadata.gz: e86a8f1861ee560b385397be2034e0933bbf020f24a1a909eec9a25e239291915aacebc74a8dddfc3172dd4d1e48f2526169101df369d321108e3e50dcc987bf
7
- data.tar.gz: 21433ad6bccf6e919838e239141b3aa27840c8c04cfe9bcf6ce9b3fc804c1168599fea7f6e6dbe1bc0d11059c6ee596e3e5bd49731411880967499b06157592a
6
+ metadata.gz: aa22da5d6f03596473026371eee473ad9607c2424d411b489dd1f292ea569022d0d3c1ea23217b923991f85df9e01b6472bc7a387707645764075496ba8e7d8c
7
+ data.tar.gz: 1c1c1c7f22760d42593f4b156734c59b01c56915b9783672261268d86d596fcd2ec4b2307074a4e207c89758b57824b6868a8ef08945da0a3735ebd979fd3e8b
@@ -10,11 +10,11 @@
10
10
 
11
11
  <div class="grid grid-cols-1 gap-y gap-x sm:grid-cols-2">
12
12
  <div class="sm:col-span-1">
13
- <%= render 'shared/fields/text_field', form: f, method: :first_name, options: {autofocus: true} %>
13
+ <%= render 'shared/fields/text_field', form: f, method: :first_name, other_options: {required: true}, options: {autofocus: true} %>
14
14
  </div>
15
15
 
16
16
  <div class="sm:col-span-1">
17
- <%= render 'shared/fields/text_field', form: f, method: :last_name %>
17
+ <%= render 'shared/fields/text_field', form: f, method: :last_name, other_options: {required: true} %>
18
18
  </div>
19
19
 
20
20
  <% # only edit the team name if this user is an admin and they are the first user. %>
@@ -30,7 +30,7 @@
30
30
  <div class="sm:col-span-2">
31
31
  <%= render 'shared/fields/super_select', form: f, method: :time_zone,
32
32
  choices: time_zone_options_for_select(@user.time_zone, nil, ActiveSupport::TimeZone),
33
- other_options: {search: true} %>
33
+ other_options: {search: true, required: true} %>
34
34
  </div>
35
35
  </div>
36
36
 
@@ -11,8 +11,8 @@
11
11
  <% end %>
12
12
  <% end %>
13
13
 
14
- <%if action_name == 'edit' %>
14
+ <% if (action_name == 'edit' && controller_name == 'teams') %>
15
15
  <%= render 'account/shared/breadcrumb', label: t('.team_settings') %>
16
- <%else %>
16
+ <% else %>
17
17
  <%= render 'account/shared/breadcrumbs/actions', only_for: 'teams' %>
18
18
  <% end %>
@@ -17,7 +17,7 @@
17
17
  <%= render 'shared/fields/password_field', form: f, method: :password, options: {show_strength_indicator: true} %>
18
18
  </div>
19
19
  <div>
20
- <%= render 'shared/fields/password_field', form: f, method: :password_confirmation, other_options: {error: f.object.errors.full_messages_for(:password).first, hide_custom_error: true} %>
20
+ <%= render 'shared/fields/password_field', form: f, method: :password_confirmation, other_options: {required: true, error: f.object.errors.full_messages_for(:password).first, hide_custom_error: true} %>
21
21
  </div>
22
22
  </div>
23
23
 
@@ -20,6 +20,8 @@ en:
20
20
  git: "bullet-train-co/bullet_train-core"
21
21
  bullet_train-outgoing_webhooks:
22
22
  git: "bullet-train-co/bullet_train-core"
23
+ bullet_train-roles:
24
+ git: "bullet-train-co/bullet_train-core"
23
25
  bullet_train-scope_questions:
24
26
  git: "bullet-train-co/bullet_train-core"
25
27
  bullet_train-scope_validator:
@@ -63,6 +63,16 @@ For example, to suppress a label on any field, we can use the `hide_label` optio
63
63
  | `help` | string | Display a specific help string. |
64
64
  | `error` | string | Display a specific error string. |
65
65
  | `hide_label` | boolean | Hide the field label. |
66
+ | `required` | boolean | Display an asterisk by the field label to indicate the field is required. |
67
+
68
+ ## `required`: through presence validation vs. `options: {required: true}` vs. `other_options:{required: true}`
69
+
70
+ By default, where there's a presence validation on the model attribute, we add an asterisk to indicate the field is required. For fields without a presence validation, you have options to pass the `:required` detail:
71
+
72
+ 1. `other_options: {required: true}` adds the asterisk to the field manually.
73
+ 2. `options: {required: true}` adds asterisk but also triggers client-side validation via the [`required`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required) attribute.
74
+
75
+ Since client-side validations vary from browser to browser, we recommend relying on server-side validation for most forms, and thus mostly using `other_options[:required]`.
66
76
 
67
77
  ## Reducing Repetition
68
78
  When you're including multiple fields, you can DRY up redundant settings (e.g. `form: form`) like so:
@@ -1,3 +1,3 @@
1
1
  module BulletTrain
2
- VERSION = "1.3.22"
2
+ VERSION = "1.3.23"
3
3
  end
@@ -311,6 +311,8 @@ namespace :bullet_train do
311
311
  "#{original_path.chomp}, git: 'http://github.com/bullet-train-co/bullet_train-core.git'\n"
312
312
  elsif link_flag_value&.match?(version_regexp)
313
313
  "#{original_path.chomp}, \"#{link_flag_value}\"\n"
314
+ elsif link_flag_value
315
+ "#{original_path.chomp}, path: \"#{link_flag_value}/#{package}\"\n"
314
316
  else
315
317
  "#{local_path}\n"
316
318
  end
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.3.22
4
+ version: 1.3.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-01 00:00:00.000000000 Z
11
+ date: 2023-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard