simple_form_extension 1.4.16 → 1.4.17
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/README.md +14 -0
- data/lib/simple_form_extension.rb +3 -0
- data/lib/simple_form_extension/inputs/image_input.rb +1 -0
- data/lib/simple_form_extension/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0880fda87e213f7de641ecfc0ca1a99537e4ca86'
|
4
|
+
data.tar.gz: 19de2b75fef0391593d598dc10fddfdf44c126f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9556a62fa16ae35cfb5e7ee041a40b3062414f77949051b4d467421c293a48d9bbeb364cf3de6a30cfea4bf448367ba99dee3f0453e231bc1221bd2c97a5e52
|
7
|
+
data.tar.gz: '004581a2f91da9b365764f4423021bc445654413db2d1afeebfdc684ac27395c1ba1593c31eda8cb42c7e4497451f6fb9b97095d44cb09244a249677161c3b6b'
|
data/README.md
CHANGED
@@ -278,6 +278,20 @@ $.get('/form/url', function(response) {
|
|
278
278
|
})
|
279
279
|
```
|
280
280
|
|
281
|
+
## Disabling image input file type validation
|
282
|
+
|
283
|
+
By default, Simple Form Extension restricts the image file types users can
|
284
|
+
select to JPEG, PNG and GIF file types. This is done by using the `accept`
|
285
|
+
html attribute of the input tag.
|
286
|
+
|
287
|
+
You can turn off this behavior by :
|
288
|
+
|
289
|
+
- Setting `SimpleFormExtension.default_image_input_accept = nil` in an
|
290
|
+
initializer for an app-wide setting
|
291
|
+
- Setting `form.input :image, input_html: { accept: nil }` locally on the fields
|
292
|
+
you want to allow other input types
|
293
|
+
|
294
|
+
|
281
295
|
## Contributing
|
282
296
|
|
283
297
|
1. Fork it ( http://github.com/xana68/simple_form_extension/fork )
|
@@ -19,6 +19,9 @@ module SimpleFormExtension
|
|
19
19
|
#
|
20
20
|
mattr_accessor :resource_name_methods
|
21
21
|
@@resource_name_methods = [:name, :title]
|
22
|
+
|
23
|
+
mattr_accessor :default_image_input_accept
|
24
|
+
@@default_image_input_accept = "image/jpeg,image/png,image/gif"
|
22
25
|
end
|
23
26
|
|
24
27
|
SimpleForm::Inputs::Base.send(:include, SimpleFormExtension::Components::Icons)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_form_extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Glyph-fr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|