asbru 0.0.15 → 0.0.16
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/lib/asbru/form_builder.rb +23 -5
- data/lib/asbru/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f1e59ef0d7603903d9130fb26f9acc5a259952269b809107185fa3e9881fe50c
|
|
4
|
+
data.tar.gz: 7425e9dfcbbc67bf3244caa1f3ca54d13a42e4a979095086ad2aa0de5b9bd49a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a8ab96f575317dc637da675b91d01dc25aaf39b8bb9d7b10b4dc04e62e8f5bd642facc98c484a289e248ff4727eed00fd777874bec86a604ab047748d39a3fd1
|
|
7
|
+
data.tar.gz: fb4fa46f0ceb53590f6229439bc9b8f55e9c51c13eaf496e8853cabddb85d03907a3d37efac6ef46af7a9397cd3ad4be26fe2153fa408f19963a8499c909ae52
|
data/lib/asbru/form_builder.rb
CHANGED
|
@@ -27,7 +27,6 @@ module Asbru
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
BASIC_FORM_FIELDS = [
|
|
30
|
-
{ submit: { text: 'Submit', type: 'submit' } },
|
|
31
30
|
{ date_field: { type: 'datepicker' } },
|
|
32
31
|
{ password_field: { type: 'password' } },
|
|
33
32
|
{ text_area: { type: 'textarea' } },
|
|
@@ -121,10 +120,29 @@ module Asbru
|
|
|
121
120
|
end
|
|
122
121
|
end
|
|
123
122
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
123
|
+
def submit(attribute = nil,
|
|
124
|
+
text: 'Submit',
|
|
125
|
+
type: 'submit',
|
|
126
|
+
**options)
|
|
127
|
+
options[:text] = text
|
|
128
|
+
options[:type] = type
|
|
129
|
+
options[:customData] = {} if options[:customData].nil?
|
|
130
|
+
|
|
131
|
+
if options.dig(:customData, :'data-disable').nil?
|
|
132
|
+
Rails.application
|
|
133
|
+
.config.action_view
|
|
134
|
+
.automatically_disable_submit_tag
|
|
135
|
+
.tap do |disable|
|
|
136
|
+
if disable == false
|
|
137
|
+
options[:customData][:'data-disable'] = false
|
|
138
|
+
else
|
|
139
|
+
options[:customData][:'data-disable'] = true
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
render_form_element attribute, options
|
|
145
|
+
end
|
|
128
146
|
|
|
129
147
|
# def date_field(attribute = nil, options = {})
|
|
130
148
|
# render_form_element attribute,
|
data/lib/asbru/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: asbru
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.16
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stev-0
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-09-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
108
108
|
- !ruby/object:Gem::Version
|
|
109
109
|
version: '0'
|
|
110
110
|
requirements: []
|
|
111
|
-
rubygems_version: 3.
|
|
111
|
+
rubygems_version: 3.2.15
|
|
112
112
|
signing_key:
|
|
113
113
|
specification_version: 4
|
|
114
114
|
summary: Asbru is a tool for creating component based webpages.
|