cama_contact_form 0.0.8 → 0.0.9

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: 7e9cbab7d8e22d41c582127770527d25e881dc10
4
- data.tar.gz: 1a012a43a1d1de4f49fa34949b5eaeab26b7927b
3
+ metadata.gz: bd3e0592f3058294a4f58e0e82fd68b4f0b91b8f
4
+ data.tar.gz: 54085dd7769b51d2c4b729b34ad802567bcf448c
5
5
  SHA512:
6
- metadata.gz: a3d445ab1784ae18a8940b9956f2f7d6962ff72fe6cef551a64bdb120c32ace938abdcfac2d4f9e4866611a920962554778c16cb0ac5251b24a775b394b81b77
7
- data.tar.gz: d66c1960768620964db77037623cfccf1ec0ececbc409898ea0d1e9f1b16cd3198d699d505cee15095dcdb1f4e7453c67c2f51db74b25a0e82479be91762d66e
6
+ metadata.gz: 00826667de8e6d526887a804d7010d7beedcfa597aa3aa01e75b481f10e2f7c07f36b44a53bcdd4c93973986d1f2a33ebefa34e671cd7039ad60e34e24b161ae
7
+ data.tar.gz: 495b5cdd8a30898106bad1f670f7c93774e0712ad74ec738f61886a5aaea894ecca4e889fd4f37ead5b0e442b690bd80827987d534cf060001aa62e9ea80fe69
@@ -91,7 +91,7 @@ module Plugins::CamaContactForm::MainHelper
91
91
 
92
92
  case ob[:field_type].to_s
93
93
  when 'paragraph','textarea'
94
- temp2 = "<textarea #{ob[:custom_attrs].to_attr_format} name=\"#{f_name}\" maxlength=\"#{field_options[:maxlength] || 500 }\" class=\"#{ob[:custom_class]} \">#{values[cid] || ob[:default_value]}</textarea>"
94
+ temp2 = "<textarea #{ob[:custom_attrs].to_attr_format} name=\"#{f_name}\" maxlength=\"#{field_options[:maxlength] || 500 }\" class=\"#{ob[:custom_class]} \">#{values[cid] || ob[:default_value].to_s.translate}</textarea>"
95
95
  when 'radio'
96
96
  temp2= cama_form_select_multiple_bootstrap(ob, ob[:label], ob[:field_type],values)
97
97
  when 'checkboxes'
@@ -100,11 +100,13 @@ module Plugins::CamaContactForm::MainHelper
100
100
  temp2 = "<button #{ob[:custom_attrs].to_attr_format} type=\"#{ob[:field_type]}\" name=\"#{f_name}\" class=\"#{ob[:custom_class].present? ? ob[:custom_class] : 'btn btn-default'}\">#{ob[:label]}</button>"
101
101
  when 'button'
102
102
  temp2 = "<button #{ob[:custom_attrs].to_attr_format} type='button' name=\"#{f_name}\" class=\"#{ob[:custom_class].present? ? ob[:custom_class] : 'btn btn-default'}\">#{ob[:label]}</button>"
103
+ when 'reset_button'
104
+ temp2 = "<button #{ob[:custom_attrs].to_attr_format} type='reset' name=\"#{f_name}\" class=\"#{ob[:custom_class].present? ? ob[:custom_class] : 'btn btn-default'}\">#{ob[:label]}</button>"
103
105
  when 'text', 'website', 'email'
104
106
  class_type = ""
105
107
  class_type = "railscf-field-#{ob[:field_type]}" if ob[:field_type]=="website"
106
108
  class_type = "railscf-field-#{ob[:field_type]}" if ob[:field_type]=="email"
107
- temp2 = "<input #{ob[:custom_attrs].to_attr_format} type=\"#{ob[:field_type]}\" value=\"#{values[cid] || ob[:default_value]}\" name=\"#{f_name}\" class=\"#{ob[:custom_class]} #{class_type}\">"
109
+ temp2 = "<input #{ob[:custom_attrs].to_attr_format} type=\"#{ob[:field_type]}\" value=\"#{values[cid] || ob[:default_value].to_s.translate}\" name=\"#{f_name}\" class=\"#{ob[:custom_class]} #{class_type}\">"
108
110
  when 'captcha'
109
111
  temp2 = cama_captcha_tag(5, {}, {class: "#{ob[:custom_class]} field-captcha required"}.merge(ob[:custom_attrs]))
110
112
  when 'file'
@@ -57,7 +57,7 @@
57
57
  <% if ['paragraph','textarea','text', 'website', 'email'].include?(field[:field_type]) %>
58
58
  <div class="form-group ">
59
59
  <label><%= t('.default_value', default: 'Default Value') %></label><br>
60
- <%= text_field_tag "fields[#{cid}][default_value]", field[:default_value], class: 'form-control' %>
60
+ <%= text_field_tag "fields[#{cid}][default_value]", field[:default_value], class: 'form-control translatable' %>
61
61
  </div>
62
62
  <% end %>
63
63
  <div class="form-group ">
@@ -178,6 +178,7 @@
178
178
  <a class="btn btn-default" data-field-type="file" ><span class="fa fa-cloud-upload"></span> <%= t('.fields.captcha', default: 'Upload File') %></a>
179
179
  <a class="btn btn-default" data-field-type="submit" ><span class="fa fa-button"></span> <%= t('.fields.submit', default: 'Submit Button') %></a>
180
180
  <a class="btn btn-default" data-field-type="button" ><span class="fa fa-button"></span> <%= t('.fields.button', default: 'Simple Button') %></a>
181
+ <a class="btn btn-default" data-field-type="reset_button" ><span class="fa fa-button"></span> <%= t('.fields.reset_button', default: 'Reset Button') %></a>
181
182
  </div>
182
183
  </div>
183
184
  </div>
@@ -57,6 +57,7 @@ es:
57
57
  paragraph: 'Campo de Texto'
58
58
  file: 'Subir Archivo'
59
59
  button: 'Botón Simple'
60
+ reset_button: 'Boton de reset'
60
61
  item_field:
61
62
  label: 'Etiqueta'
62
63
  descr: 'Descripción'
@@ -1,3 +1,3 @@
1
1
  module CamaContactForm
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cama_contact_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Owen Peredo