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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 993559dba6ebc55e32248479b50f6316a0923f760ae10c561764e9b082997f58
4
- data.tar.gz: 754b7ef1031c805f07f1556a4b58e1c4196297549c502fc91774933dade722f0
3
+ metadata.gz: c86e25a2a64d907710532205286243303ba59dc13be55c7e7b9c598d9fdbb771
4
+ data.tar.gz: 0750edb2e73c200f92de9d02f32c286eb91a13724d37e41dfdc13c3496c4b629
5
5
  SHA512:
6
- metadata.gz: e944682b5bff28a179b95998630b4c7ae9f8c133749db78f0d6fafad64513585e77bc7acd76bf6b99626d46f9030853daf17182881f6564284dd7f3c221cf619
7
- data.tar.gz: dbf97f171cdfd53619dfa121ebad0a3e1d2fef4905ea0bdffbe3b3c59067b073e920788d6ab9b404a4ffa2b86f80128d2293f3e5310e5b0d433f298b96775091
6
+ metadata.gz: 3f4ce3e7ca71bd6c8acbfed1f6fdf33f8934b4b5fbf78dc78ef2b1c30459e45bac7e972d20b7ad7fdbe6f54d3f72e6f998cfcfdeb24ec34fe90f7418ff49b268
7
+ data.tar.gz: 77cd7f7c4590d09d704c72cd2e9c78e892634416669d6779463be1ed958ab72d2efd4294dc8ad3d7df9b69bb71060fd8fa500ca7864758bd97775a91058584a7
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Next version
4
4
 
5
+ ## 1.4.3
6
+
7
+ - `form_buttons` helper fixes and improvements
8
+
5
9
  ## 1.4.2
6
10
 
7
11
  - Fix FontAwesome helper
@@ -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.blank?
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") {} + " " + t("actions.#{submit_action}")
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") {} + " " + t("actions.cancel")
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
@@ -1,3 +1,3 @@
1
1
  module Agilibox
2
- VERSION = "1.4.2"
2
+ VERSION = "1.4.3"
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.4.2
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-12 00:00:00.000000000 Z
11
+ date: 2018-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails-i18n