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 +4 -4
- data/app/helpers/plugins/cama_contact_form/main_helper.rb +4 -2
- data/app/views/plugins/cama_contact_form/admin_forms/_item_field.html.erb +1 -1
- data/app/views/plugins/cama_contact_form/admin_forms/edit.html.erb +1 -0
- data/config/locales/es.yml +1 -0
- data/lib/cama_contact_form/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd3e0592f3058294a4f58e0e82fd68b4f0b91b8f
|
4
|
+
data.tar.gz: 54085dd7769b51d2c4b729b34ad802567bcf448c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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>
|
data/config/locales/es.yml
CHANGED