pxs-forms 0.1.4.6 → 0.1.4.8
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 +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/pxs/forms/configuration.rb +3 -0
- data/lib/pxs/forms/links_helper.rb +2 -2
- data/lib/pxs/forms/model_form_builder.rb +2 -11
- data/lib/pxs/forms/models_helper.rb +1 -1
- data/lib/pxs/forms/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: 5945f2e5aedbdf454e7dbd4e5e2abaa293f83274215180164e02e92503cbbf93
|
4
|
+
data.tar.gz: 24cea079a00f0e9d8be354b42f3b16025c21e8c98611ff0b3fa9d8f0c35814ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afe63a23ba05d23cfa0e44517ff22a745532bce1457d624029092050f87612e598f443b1ee1feae129e39702b057a43633802abeffa52cbd17b59d1920dc714d
|
7
|
+
data.tar.gz: '0917a72c41b915f82cf8853a3b98bbb4f37ae1034ea5b28565ef4ede3e3dce6880eeecfdd34bdecad0ea6b2b88eaf0043c678c0680f7ca53e55fa314b8ffed93'
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,15 @@
|
|
2
2
|
|
3
3
|
## Unofficial Release
|
4
4
|
|
5
|
+
## [0.1.4.8] - 2025-04-22
|
6
|
+
|
7
|
+
- Fix `data` attribute not being passed along to `turbo_link_to`, `link_button_to`
|
8
|
+
|
9
|
+
## [0.1.4.7] - 2025-04-08
|
10
|
+
|
11
|
+
- Fix string input not properly invoking string field
|
12
|
+
- Fix date field showing a rendundant date select
|
13
|
+
|
5
14
|
## [0.1.4.3-6] - 2025-04-03
|
6
15
|
|
7
16
|
- Fix I18n missing from a I18n.t function call
|
@@ -5,7 +5,7 @@ module Pxs
|
|
5
5
|
|
6
6
|
# a link that triggers a turbo request
|
7
7
|
def turbo_link_to(text, target, options = {})
|
8
|
-
link_to text, target, class: options[:class] || nil, data: { turbo_stream: true, turbo_method: options[:method] || :get, turbo_confirm: options[:confirm] }, id: options[:id], title: options[:title]
|
8
|
+
link_to text, target, class: options[:class] || nil, data: { turbo_stream: true, turbo_method: options[:method] || :get, turbo_confirm: options[:confirm] }.merge(options[:data] || {}), id: options[:id], title: options[:title]
|
9
9
|
end
|
10
10
|
|
11
11
|
# a button that triggers a turbo request
|
@@ -16,7 +16,7 @@ module Pxs
|
|
16
16
|
|
17
17
|
# a button that makes an HTML request
|
18
18
|
def link_button_to(text, target, options = {})
|
19
|
-
link_to text, target, class: merge_option(:class, "button", options)[:class], method: options[:method] || :get, id: options[:id], title: options[:title]
|
19
|
+
link_to text, target, class: merge_option(:class, "button", options)[:class], method: options[:method] || :get, id: options[:id], title: options[:title], data: options[:data]
|
20
20
|
end
|
21
21
|
|
22
22
|
private
|
@@ -188,7 +188,7 @@ class ModelFormBuilder < ActionView::Helpers::FormBuilder
|
|
188
188
|
|
189
189
|
safe_join [
|
190
190
|
(field_label(attribute, options[:label]) unless options[:label] == false),
|
191
|
-
|
191
|
+
string_field(attribute, merge_input_options({class: has_error?(attribute) ? "is-invalid" : nil}, objectify_options(options[:input_html] || {}))),
|
192
192
|
]
|
193
193
|
end
|
194
194
|
end
|
@@ -296,16 +296,7 @@ class ModelFormBuilder < ActionView::Helpers::FormBuilder
|
|
296
296
|
options = { value: object[attribute] }.merge(options)
|
297
297
|
case object_type_for_attribute(attribute)
|
298
298
|
when :date then
|
299
|
-
|
300
|
-
@template.date_field(base_input_name, attribute, merge_input_options(options, {data: {datepicker: true}})),
|
301
|
-
tag.div {
|
302
|
-
date_select(attribute, {
|
303
|
-
order: [:year, :month, :day],
|
304
|
-
start_year: Date.today.year,
|
305
|
-
end_year: Date.today.year,
|
306
|
-
}, {data: {date_select: true}})
|
307
|
-
},
|
308
|
-
]
|
299
|
+
@template.date_field(base_input_name, attribute, merge_input_options(options, {data: {datepicker: true}}))
|
309
300
|
when :integer then @template.number_field(base_input_name, attribute, options)
|
310
301
|
when :decimal then @template.number_field(base_input_name, attribute, {step: 0.1}.merge(options))
|
311
302
|
when :string
|
data/lib/pxs/forms/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pxs-forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.4.
|
4
|
+
version: 0.1.4.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Poubelle
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-04-
|
11
|
+
date: 2025-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|