formatic 0.2.11 → 0.2.12
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 +4 -0
- data/app/components/formatic/base.rb +4 -0
- data/app/components/formatic/file.rb +5 -1
- data/app/components/formatic/stepper.rb +1 -0
- data/app/components/formatic/string.rb +1 -0
- data/app/components/formatic/time.rb +2 -0
- data/app/components/formatic/toggle.rb +1 -1
- data/lib/formatic/engine.rb +2 -0
- data/lib/formatic/templates/date.rb +3 -0
- data/lib/formatic/templates/select.rb +1 -1
- data/lib/formatic/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a7e3e2484fd61fe3a436e68d059689803fc339553b243c95ccfcd6f0dd4f7a40
|
|
4
|
+
data.tar.gz: cd26ab984cb09ef2552a2cf2efb86edfa89d6839edc12dee8fa2c4479c7b746f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9dd0bc7504620621b5bc3104fc335aba51268d495f8e143b53d9e348ed26736bd47ea02c4a683ce379583be5f9fc89e1c8715b0ecd06244ca84983357e9a3a5f
|
|
7
|
+
data.tar.gz: d1b8430e512ca12718da806cb9d5ab65750944d45aa03bcd5b4f9bebb8b15171c491c9f15529d6a71a54216bb7a2e3f6d2cb43cec96c7d38f11d9ea4c0e71659
|
data/CHANGELOG.md
CHANGED
|
@@ -26,12 +26,16 @@ module Formatic
|
|
|
26
26
|
<%- end -%>
|
|
27
27
|
</div>
|
|
28
28
|
|
|
29
|
-
<%= f.file_field attribute_name, class: "js-formatic-file__input", direct_upload:, multiple:, accept:, data:
|
|
29
|
+
<%= f.file_field attribute_name, class: "js-formatic-file__input", direct_upload:, multiple:, accept:, data: %>
|
|
30
30
|
</div>
|
|
31
31
|
<% end %>
|
|
32
32
|
<% end %>
|
|
33
33
|
ERB
|
|
34
34
|
|
|
35
|
+
def data
|
|
36
|
+
{ entries: entries_json }.merge(manual_data)
|
|
37
|
+
end
|
|
38
|
+
|
|
35
39
|
private
|
|
36
40
|
|
|
37
41
|
def attachments
|
|
@@ -24,11 +24,13 @@ module Formatic
|
|
|
24
24
|
<%= select_tag hour_attribute_name,
|
|
25
25
|
options_for_hour,
|
|
26
26
|
id: hour_input_id,
|
|
27
|
+
data:,
|
|
27
28
|
class: 'c-formatic-time__select' %>
|
|
28
29
|
|
|
29
30
|
<%= select_tag minute_attribute_name,
|
|
30
31
|
options_for_minute,
|
|
31
32
|
id: minute_input_id,
|
|
33
|
+
data:,
|
|
32
34
|
class: 'c-formatic-time__select' %>
|
|
33
35
|
</div>
|
|
34
36
|
<% end -%>
|
|
@@ -18,7 +18,7 @@ module Formatic
|
|
|
18
18
|
<% else %>
|
|
19
19
|
<%= f.label attribute_name, nil, { for: dom_id } do |builder| %>
|
|
20
20
|
<%
|
|
21
|
-
f.check_box(attribute_name, { id: dom_id, class: css_classes }) +
|
|
21
|
+
f.check_box(attribute_name, { id: dom_id, data:, class: css_classes }) +
|
|
22
22
|
content_tag(:i) +
|
|
23
23
|
content_tag(:div, human_attribute_name, class: 'c-formatic-toggle__label-caption-dummy') +
|
|
24
24
|
content_tag(:div, wrap.toggle_on, class: 'is-active') +
|
data/lib/formatic/engine.rb
CHANGED
|
@@ -58,6 +58,8 @@ module Formatic
|
|
|
58
58
|
require_relative '../../app/components/formatic/stepper'
|
|
59
59
|
require_relative '../../app/components/formatic/textarea'
|
|
60
60
|
require_relative '../../app/components/formatic/time'
|
|
61
|
+
require_relative '../../app/components/formatic/file'
|
|
62
|
+
require_relative '../../app/components/formatic/files'
|
|
61
63
|
end
|
|
62
64
|
end
|
|
63
65
|
end
|
|
@@ -25,17 +25,20 @@ module Formatic
|
|
|
25
25
|
<%= select_tag day_attribute_name,
|
|
26
26
|
options_for_day,
|
|
27
27
|
id: day_input_id,
|
|
28
|
+
data:,
|
|
28
29
|
class: 'c-formatic-date__select js-formatic-date__day' %>
|
|
29
30
|
<% end %>
|
|
30
31
|
|
|
31
32
|
<%= select_tag month_attribute_name,
|
|
32
33
|
options_for_month,
|
|
33
34
|
id: month_input_id,
|
|
35
|
+
data:,
|
|
34
36
|
class: 'c-formatic-date__select js-formatic-date__month' %>
|
|
35
37
|
|
|
36
38
|
<%= select_tag year_attribute_name,
|
|
37
39
|
options_for_year,
|
|
38
40
|
id: year_input_id,
|
|
41
|
+
data:,
|
|
39
42
|
class: 'c-formatic-date__select js-formatic-date__year' %>
|
|
40
43
|
</div>
|
|
41
44
|
<% if calendar? %>
|
|
@@ -17,7 +17,7 @@ module Formatic
|
|
|
17
17
|
</div>
|
|
18
18
|
<% else %>
|
|
19
19
|
|
|
20
|
-
<%= f.select attribute_name, choices, {}, { class: ['c-formatic-select', 'js-formatic-select', ('is-autosubmit' if async_submit)] } %>
|
|
20
|
+
<%= f.select attribute_name, choices, {}, { data:, class: ['c-formatic-select', 'js-formatic-select', ('is-autosubmit' if async_submit)] } %>
|
|
21
21
|
|
|
22
22
|
<% end %>
|
|
23
23
|
</div>
|
data/lib/formatic/version.rb
CHANGED