agilibox 1.10.2 → 1.10.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c957ea49c90e282829586fcc2e643e29f0cafdf6de7addd6867e7c7ccb84b208
4
- data.tar.gz: 7a03a0ccea759d460a7c67deb95f44e9e06f09ae89ddf9e8038e23f8112749a7
3
+ metadata.gz: '099effdf6498e39ccfe893143dabb321eac11de3ffd0bf58c668aa2d2478c19b'
4
+ data.tar.gz: 39df78a37082ec5bd827bbbbf94efa7f26376736e92ecc1cd1858d2ed60cf6d1
5
5
  SHA512:
6
- metadata.gz: b458a4602f68758275b70049a33def1d27658af96e4d6941251702b0d2957b5968c3cd2cf7bb682338f4c3a931233e054636629e9539053ef5700ad9102c847b
7
- data.tar.gz: f64d11c96a644d6f2871820a25f1ba000904dbecf50037fa07b69cfe37c1f87aab16041a9188f0fb78c9ff9d988597408ba8f3dac9d78682c755c3a5d1badc36
6
+ metadata.gz: '08ba38eec7f7fe4ccfe22b5d1ff26c4049f733ab2a455a86147af882ed909aee32a80cbeecc354b1efbf77867a4610992bbf9e126325e772ab34f64e14726501'
7
+ data.tar.gz: d81c0baa5c0ec86b83d49202a4170d9de287028f195ba3aa6d755cda73f0058581ffd7ae3fb590567ad9c77b36ef1b4bf5b6eb2985fe96c22f00d389eee291e9
data/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  ## Next version
4
4
 
5
+ ## v1.10.5
6
+ - Fix hidden_inputs_for_get_form again
7
+
8
+ ## v1.10.4
9
+ - Fix hidden_inputs_for_get_form
10
+
11
+ ## v1.10.3
12
+ - Fix search forms to preserve GET params
13
+
5
14
  ## v1.10.2
6
15
  - Filters improvements
7
16
 
@@ -59,4 +59,14 @@ module Agilibox::FormHelper
59
59
  :label => label,
60
60
  )
61
61
  end
62
+
63
+ def hidden_inputs_for_get_form(url, except: [])
64
+ query_values = Addressable::URI.parse(url).query_values.to_h
65
+ .with_indifferent_access
66
+ .except(*except)
67
+
68
+ return if query_values.empty?
69
+
70
+ query_values.sum { |k, v| tag.input(type: "hidden", name: k, value: v) }
71
+ end
62
72
  end
@@ -1,4 +1,5 @@
1
1
  form.search.bs3 method="get" action=action
2
+ = hidden_inputs_for_get_form(action, except: [:q])
2
3
  = form_hidden_submit
3
4
 
4
5
  p.input-group.search
@@ -1,4 +1,5 @@
1
1
  form.search.bs4 method="get" action=action
2
+ = hidden_inputs_for_get_form(action, except: [:q])
2
3
  = form_hidden_submit
3
4
 
4
5
  .input-group.search
@@ -1,4 +1,5 @@
1
1
  form.search.bs5.mb-3 method="get" action=action
2
+ = hidden_inputs_for_get_form(action, except: [:q])
2
3
  = form_hidden_submit
3
4
 
4
5
  .input-group.search
@@ -1,3 +1,3 @@
1
1
  module Agilibox
2
- VERSION = "1.10.2"
2
+ VERSION = "1.10.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agilibox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.2
4
+ version: 1.10.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - agilidée
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-16 00:00:00.000000000 Z
11
+ date: 2021-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails-i18n
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: addressable
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  description: Agilibox
84
98
  email:
85
99
  - contact@agilidee.com