agilibox 1.4.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/app/helpers/agilibox/form_helper.rb +9 -7
- data/lib/agilibox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c86e25a2a64d907710532205286243303ba59dc13be55c7e7b9c598d9fdbb771
|
4
|
+
data.tar.gz: 0750edb2e73c200f92de9d02f32c286eb91a13724d37e41dfdc13c3496c4b629
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f4ce3e7ca71bd6c8acbfed1f6fdf33f8934b4b5fbf78dc78ef2b1c30459e45bac7e972d20b7ad7fdbe6f54d3f72e6f998cfcfdeb24ec34fe90f7418ff49b268
|
7
|
+
data.tar.gz: 77cd7f7c4590d09d704c72cd2e9c78e892634416669d6779463be1ed958ab72d2efd4294dc8ad3d7df9b69bb71060fd8fa500ca7864758bd97775a91058584a7
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
module Agilibox::FormHelper
|
2
|
+
include Agilibox::I18nHelper
|
3
|
+
|
2
4
|
# Hidden submit to be the default triggered on <enter> keypress on a form
|
3
5
|
def form_hidden_submit
|
4
6
|
tag(:input, type: "submit", class: "hidden-submit")
|
@@ -6,8 +8,8 @@ module Agilibox::FormHelper
|
|
6
8
|
|
7
9
|
def form_buttons(opts = {})
|
8
10
|
back_url = opts[:back_url]
|
9
|
-
back_url = url_for(:back).html_safe if back_url.
|
10
|
-
back_url = URI(back_url).path if back_url.include?("://")
|
11
|
+
back_url = url_for(:back).html_safe if back_url.nil?
|
12
|
+
back_url = URI(back_url).path if back_url.to_s.include?("://")
|
11
13
|
|
12
14
|
if opts[:obj].present?
|
13
15
|
if opts[:obj].new_record?
|
@@ -19,13 +21,13 @@ module Agilibox::FormHelper
|
|
19
21
|
submit_action = :save
|
20
22
|
end
|
21
23
|
|
22
|
-
content_tag("div", class: "actions") do
|
23
|
-
submit = content_tag(:button, type: :submit, class: "btn btn-sm btn-success") do
|
24
|
-
content_tag(:span, class: "fa fa-save") {} + " " +
|
24
|
+
content_tag("div", class: "actions form-actions") do
|
25
|
+
submit = content_tag(:button, type: :submit, class: "btn btn-sm btn-success form-submit") do
|
26
|
+
content_tag(:span, class: "fa fa-save") {} + " " + ta(submit_action)
|
25
27
|
end
|
26
28
|
|
27
|
-
cancel = content_tag("a", href: back_url, class: "btn btn-primary btn-sm") do
|
28
|
-
content_tag(:span, class: "fa fa-times") {} + " " +
|
29
|
+
cancel = content_tag("a", href: back_url, class: "btn btn-primary btn-sm form-cancel") do
|
30
|
+
content_tag(:span, class: "fa fa-times") {} + " " + ta(:cancel)
|
29
31
|
end
|
30
32
|
|
31
33
|
cancel = "" if back_url == false
|
data/lib/agilibox/version.rb
CHANGED
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.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- agilidée
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails-i18n
|