simple_form_bs5_file_input 0.1.5 → 0.1.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee672a494d530c3c1b9dc5cbddc3876da798275a247bfa326ad48668ce41a098
|
4
|
+
data.tar.gz: e167386d3b3909ce71975e52f9e28f6f2db8f4f8cdd0c565dd4442032bac5a14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65d0c4998529d77d4d5a9c8b859fd754f3e6f4a7c8675b140fc47ae811bb24f3e4974df1ddcdce46f790f4adef6b706bc5bd963ff6b146550274dfb9ebd4b61f
|
7
|
+
data.tar.gz: b014540be1c63981422aa16c85c37cd04255dcce2e811bfd9a2c9cff15dd88e1da5a3d2f28223d9ba5b3a3e50b6e6ff436e3c6075b0976f6cd6a870d09c217f8
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
simple_form_bs5_file_input (0.1.
|
4
|
+
simple_form_bs5_file_input (0.1.6)
|
5
5
|
rails
|
6
6
|
simple_form
|
7
7
|
|
@@ -136,16 +136,16 @@ GEM
|
|
136
136
|
minitest (5.22.3)
|
137
137
|
msgpack (1.7.2)
|
138
138
|
mutex_m (0.2.0)
|
139
|
-
net-imap (0.
|
139
|
+
net-imap (0.5.0)
|
140
140
|
date
|
141
141
|
net-protocol
|
142
142
|
net-pop (0.1.2)
|
143
143
|
net-protocol
|
144
144
|
net-protocol (0.2.2)
|
145
145
|
timeout
|
146
|
-
net-smtp (0.
|
146
|
+
net-smtp (0.5.0)
|
147
147
|
net-protocol
|
148
|
-
nio4r (2.7.
|
148
|
+
nio4r (2.7.3)
|
149
149
|
nokogiri (1.16.2)
|
150
150
|
mini_portile2 (~> 2.8.2)
|
151
151
|
racc (~> 1.4)
|
@@ -236,4 +236,4 @@ DEPENDENCIES
|
|
236
236
|
sqlite3
|
237
237
|
|
238
238
|
BUNDLED WITH
|
239
|
-
2.
|
239
|
+
2.5.22
|
@@ -22,11 +22,17 @@ class SingleDeletableFileInput < SimpleForm::Inputs::Base
|
|
22
22
|
%s
|
23
23
|
%s
|
24
24
|
</div>
|
25
|
-
',
|
25
|
+
', input_wrapper_classes(wrapper_options), input_field(wrapper_options), field_classes(wrapper_options), change_file_text, field_id, existing_file_name_or_default_text, input_infos_name, input_infos_value, input_delete_name, input_delete_value, preview_div, resize_div)
|
26
26
|
end
|
27
27
|
|
28
|
-
def
|
29
|
-
|
28
|
+
def input_wrapper_classes(wrapper_options)
|
29
|
+
classes = []
|
30
|
+
classes << 'sdfi-deletable-file--with-file' if should_display_file?
|
31
|
+
error_class = wrapper_options[:error_class]
|
32
|
+
classes << error_class if error_class.present? && has_errors?
|
33
|
+
valid_class = wrapper_options[:valid_class]
|
34
|
+
classes << valid_class if valid_class.present? && valid?
|
35
|
+
classes.join(' ')
|
30
36
|
end
|
31
37
|
|
32
38
|
def input_field(wrapper_options)
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_form_bs5_file_input
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pierre-andré Boissinot
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-04-14 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: rails
|
@@ -94,7 +93,6 @@ homepage: https://github.com/noesya/simple_form_bs5_file_input
|
|
94
93
|
licenses:
|
95
94
|
- MIT
|
96
95
|
metadata: {}
|
97
|
-
post_install_message:
|
98
96
|
rdoc_options: []
|
99
97
|
require_paths:
|
100
98
|
- lib
|
@@ -109,8 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
107
|
- !ruby/object:Gem::Version
|
110
108
|
version: '0'
|
111
109
|
requirements: []
|
112
|
-
rubygems_version: 3.
|
113
|
-
signing_key:
|
110
|
+
rubygems_version: 3.6.2
|
114
111
|
specification_version: 4
|
115
112
|
summary: Simple Form BS5 File Input
|
116
113
|
test_files: []
|