bullet_train-themes 1.6.38 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/themes/base/fields/_ckeditor.html.erb +2 -1
- data/app/views/themes/base/fields/_password_field.html.erb +3 -0
- data/app/views/themes/base/fields/_phone_field.html.erb +1 -1
- data/app/views/themes/base/fields/_super_select.html.erb +6 -2
- data/app/views/themes/base/fields/_trix_editor.html.erb +2 -1
- data/lib/bullet_train/themes/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: a5ed485a49d80524dcb745e4355d9663259d4c42461f37611042470a351fc9aa
|
4
|
+
data.tar.gz: 22740cf4efeb09d9a61ec84f9b803038e6a9e4403020c0c7e71dfcfba47ac97b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7aa4d1a685b8ce49ca8f7e8cf4fe02b9e66da856fdf8abed95ab6ffc628cea2882f901a868da2f84b7d85bfb4f067b0e327c4dd80886c42991c577a7b710a20a
|
7
|
+
data.tar.gz: 3124346b9898fdc6ecc08f25c41c6b573d4e50e0a0392f5794f6ea59f947f137fe7485300bb297837b5ffdc57733e704a43b2e39f11cebc22cc4a0071f84aee3
|
@@ -9,9 +9,10 @@ stimulus_controller = 'fields--ckeditor'
|
|
9
9
|
|
10
10
|
form ||= current_fields_form
|
11
11
|
options ||= {}
|
12
|
-
options = options.merge({ data: {"#{stimulus_controller}-target": 'field' }})
|
13
12
|
other_options ||= {}
|
14
13
|
|
14
|
+
# TODO: Remove this if it's unneeded.
|
15
|
+
options = options.merge({ data: {"#{stimulus_controller}-target": 'field' }})
|
15
16
|
%>
|
16
17
|
|
17
18
|
<%= render 'shared/fields/field', form: form, method: method, options: options, other_options: other_options do %>
|
@@ -6,6 +6,7 @@ options ||= {}
|
|
6
6
|
|
7
7
|
strong_passwords = Object.const_defined?("BulletTrain::Configuration") ? BulletTrain::Configuration.strong_passwords : true
|
8
8
|
|
9
|
+
# TODO: This should be `bt_options`
|
9
10
|
if options[:show_strength_indicator] && strong_passwords
|
10
11
|
options = options.merge({ data: {"action": "keyup->fields--password#estimateStrength" }})
|
11
12
|
end
|
@@ -15,6 +16,8 @@ other_options ||= {}
|
|
15
16
|
|
16
17
|
<div data-controller="<%= stimulus_controller %>">
|
17
18
|
<%= render 'shared/fields/field', form: form, method: method, helper: :password_field, options: options, other_options: other_options %>
|
19
|
+
|
20
|
+
<%# TODO: This should be `bt_options` %>
|
18
21
|
<% if options[:show_strength_indicator] %>
|
19
22
|
<% # TODO This is the wrong place to define this kind of style, but I couldn't make this work in the `:help` content buffer. %>
|
20
23
|
<div data-<%= stimulus_controller %>-target="strengthIndicator" class="hidden mt-1.5 text-xs text-red-500"></div>
|
@@ -3,9 +3,9 @@ stimulus_controller = 'fields--phone'
|
|
3
3
|
|
4
4
|
form ||= current_fields_form
|
5
5
|
options ||= {}
|
6
|
-
options = options.merge({type: 'tel', data: {method: method, "#{stimulus_controller}-target": 'field' }})
|
7
6
|
other_options ||= {}
|
8
7
|
|
8
|
+
options = options.merge({type: 'tel', data: {method: method, "#{stimulus_controller}-target": 'field' }})
|
9
9
|
%>
|
10
10
|
|
11
11
|
<div data-controller="<%= stimulus_controller %>">
|
@@ -6,14 +6,16 @@ options ||= {}
|
|
6
6
|
other_options ||= {}
|
7
7
|
select2_options ||= nil
|
8
8
|
html_options ||= {}
|
9
|
+
choices_url ||= nil
|
10
|
+
|
9
11
|
html_options[:id] ||= form.field_id(method)
|
10
12
|
html_options[:class] = "form-control select2 #{html_options[:class]}".strip
|
11
|
-
|
13
|
+
|
12
14
|
if choices_url.nil?
|
13
15
|
choices ||= options_for(form, method)&.invert
|
14
16
|
else
|
15
17
|
# If we have a choices_url, we're going to lazy load the choices. However, we still want to show the currently selected option.
|
16
|
-
method_without_id = method.to_s.gsub("_id", "")
|
18
|
+
method_without_id = method.to_s.gsub("_id", "") # TODO: We should use /_id$/.
|
17
19
|
if current_selection = form.object.send(method_without_id)
|
18
20
|
choices = [[current_selection.label_string, current_selection.id]]
|
19
21
|
else
|
@@ -24,6 +26,8 @@ end
|
|
24
26
|
other_options[:use_browser_time_zone] = true if other_options[:use_browser_time_zone].nil?
|
25
27
|
use_browser_time_zone = other_options[:use_browser_time_zone]
|
26
28
|
|
29
|
+
# TODO: Change name for `wrapper_options`, maybe to simply `wrapper`.
|
30
|
+
# This seems to be internal, so we shouldn't need to write docs or a deprecation message for it.
|
27
31
|
wrapper_options ||= {}
|
28
32
|
wrapper_options[:data] ||= {}
|
29
33
|
wrapper_options[:data][:controller] ||= ""
|
@@ -2,6 +2,8 @@
|
|
2
2
|
form ||= current_fields_form
|
3
3
|
labels = labels_for(form, method)
|
4
4
|
options ||= {}
|
5
|
+
other_options ||= {}
|
6
|
+
|
5
7
|
options[:class] = "formatted_content trix-content #{options[:class]}"
|
6
8
|
options[:placeholder] ||= labels.placeholder if labels.placeholder
|
7
9
|
options[:data] ||= {}
|
@@ -16,7 +18,6 @@ options[:data][:topics] ||= []
|
|
16
18
|
# current_team.scaffolding_things.map { |scaffolding_thing|
|
17
19
|
# {key: scaffolding_thing.name, value: scaffolding_thing.id, protocol: 'bullettrain', model: 'scaffolding/things', id: scaffolding_thing.id, label: scaffolding_thing.name, photo: photo_for(scaffolding_thing)}
|
18
20
|
# }.to_json
|
19
|
-
other_options ||= {}
|
20
21
|
%>
|
21
22
|
|
22
23
|
<div class="<%= 'trix-hide-toolbar' if other_options[:hide_toolbar] %>">
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train-themes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.1
|
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-03-
|
11
|
+
date: 2024-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|