cama_contact_form 0.0.6 → 0.0.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d34af2e79a6abcddad135a29e375332e012150e9
|
4
|
+
data.tar.gz: 5917aa3ad8e4f33e9bbea677cb00c938f5d6a592
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 178d7bc5dcea9cf56ddcf51a6168ff2f7509e1dc89aa235f4a14b7bf823cde5f84655e573fb95371553d15454bf95e683e2c342f78a10aa0c5d1d159d6a0beba
|
7
|
+
data.tar.gz: 99a8059d495aae6caf48a901e7c5de10c351a62068732b7559ba343d971730130ba121d277d44d8774d36bb213abe1bb3a472774997faa588b7a4785d92f9f04
|
@@ -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]}</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>"
|
95
95
|
when 'radio'
|
96
96
|
temp2= cama_form_select_multiple_bootstrap(ob, ob[:label], ob[:field_type],values)
|
97
97
|
when 'checkboxes'
|
@@ -102,7 +102,7 @@ module Plugins::CamaContactForm::MainHelper
|
|
102
102
|
class_type = ""
|
103
103
|
class_type = "railscf-field-#{ob[:field_type]}" if ob[:field_type]=="website"
|
104
104
|
class_type = "railscf-field-#{ob[:field_type]}" if ob[:field_type]=="email"
|
105
|
-
temp2 = "<input #{ob[:custom_attrs].to_attr_format} type=\"#{ob[:field_type]}\" value=\"#{values[cid]}\" name=\"#{f_name}\" class=\"#{ob[:custom_class]} #{class_type}\">"
|
105
|
+
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}\">"
|
106
106
|
when 'captcha'
|
107
107
|
temp2 = cama_captcha_tag(5, {}, {class: "#{ob[:custom_class]} field-captcha required"}.merge(ob[:custom_attrs]))
|
108
108
|
when 'file'
|
@@ -54,6 +54,12 @@
|
|
54
54
|
<a class="btn btn-default btn-xs html_btn"><%= t('.html_code', default: 'HTML Code') %> <i class='fa fa-cog'></i></a>
|
55
55
|
<div class="hidden">
|
56
56
|
<hr>
|
57
|
+
<% if ['paragraph','textarea','text', 'website', 'email'].include?(field[:field_type]) %>
|
58
|
+
<div class="form-group ">
|
59
|
+
<label><%= t('.default_value', default: 'Default Value') %></label><br>
|
60
|
+
<%= text_field_tag "fields[#{cid}][default_value]", field[:default_value], class: 'form-control' %>
|
61
|
+
</div>
|
62
|
+
<% end %>
|
57
63
|
<div class="form-group ">
|
58
64
|
<label><%= t('.custom_class', default: 'Custom Class') %></label><br>
|
59
65
|
<%= text_field_tag "fields[#{cid}][field_options][field_class]", field[:field_options][:field_class], class: 'form-control' %>
|
data/config/locales/es.yml
CHANGED