scrivito_crm_form_widget 0.9.0.beta3 → 0.9.0.beta4

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
  SHA1:
3
- metadata.gz: 445ae51d6ff6bd4b7d01038a4de1e0656b2b14e4
4
- data.tar.gz: 87420d5167f8893a63b3411a3f0f7bec15962676
3
+ metadata.gz: a06209bc113cc89786f963d48d5aedd2dc6f4f3b
4
+ data.tar.gz: b4b41373a34aacda09c4f850ddf072e7709a7a11
5
5
  SHA512:
6
- metadata.gz: b3737a7f7bd5ded881213af98218ff3cc01b7744f6e7c18131d99179ef0661c9b97afef1c6183bf59cb4649a4c787cd9c0c613633095ad8aec0b4f62f769f96c
7
- data.tar.gz: 643ed3f4b9fc428ea3f13e36ebbc0f986ec641024c0e587b835bbe3f285373e78178e0f1e0f64d6d9c27c067e62ece645152378c3667aef730899d9e08eed212
6
+ metadata.gz: 70875a541ccfba903ac0e6bfbcb02a0643f68a751af31c8b522fb966f7183ce8e467417c71026ff3940700d20f9daf6d2e07afaaaf74ca505627c81c6b061322
7
+ data.tar.gz: aec6630283edb2b7093f18cb473b0843edd95ddc7e2cc004b371748489646f3330400c5a60d16d6cce29e5bebc2f345902d4618823b698e7ac826e1b5becb869
@@ -73,4 +73,9 @@ class CrmFormWidget < Widget
73
73
  def file_upload?
74
74
  file_upload == 'Yes'
75
75
  end
76
+
77
+ def placeholder(field)
78
+ local = "helpers.placeholder.crm_form_presenter.#{field}"
79
+ I18n.exists?(local) ? I18n.t(local) : nil
80
+ end
76
81
  end
@@ -1,6 +1,6 @@
1
1
  <div class="form-group form-field-<%= name %>">
2
2
  <%= form.label name.to_sym, label, class: "control-label col-sm-3 #{options[:mandatory] ? 'mandatory' : ''}" %>
3
3
  <div class="col-sm-9">
4
- <%= form.text_field name.to_sym, class: "form-control", maxlength: options[:maxlength] %>
4
+ <%= form.text_field name.to_sym, class: "form-control", maxlength: options[:maxlength], placeholder: widget.placeholder(name.parameterize) %>
5
5
  </div>
6
6
  </div>
@@ -1,6 +1,6 @@
1
1
  <div class="form-group form-field-<%= name %>">
2
2
  <%= form.label name.to_sym, label, class: "control-label col-sm-3 #{options[:mandatory] ? 'mandatory' : ''}" %>
3
3
  <div class="col-sm-9">
4
- <%= form.text_area name.to_sym, class: "form-control", maxlength: options[:maxlength] %>
4
+ <%= form.text_area name.to_sym, class: "form-control", maxlength: options[:maxlength], placeholder: widget.placeholder(name.parameterize) %>
5
5
  </div>
6
- </div>
6
+ </div>
@@ -1,3 +1,3 @@
1
1
  module ScrivitoCrmFormWidget
2
- VERSION = "0.9.0.beta3"
2
+ VERSION = "0.9.0.beta4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_crm_form_widget
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0.beta3
4
+ version: 0.9.0.beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito