forked from spen/seminar
使用者體驗
This commit is contained in:
parent
9d4e1e0945
commit
2b15ecb5fe
|
@ -169,9 +169,7 @@ module Admin::SeminarsFieldHelper
|
||||||
key = can_muti_lang_input_for_sm? ? "#{key}" : I18n.locale
|
key = can_muti_lang_input_for_sm? ? "#{key}" : I18n.locale
|
||||||
place_holder= typeD["placeholder"][key] rescue ''
|
place_holder= typeD["placeholder"][key] rescue ''
|
||||||
name1 = can_muti_lang_input_for_sm? ? (get_field_name_base + "[#{key}]") : get_field_name_base
|
name1 = can_muti_lang_input_for_sm? ? (get_field_name_base + "[#{key}]") : get_field_name_base
|
||||||
text_area_tag(name1, value, @markup_options.merge(:placeholder=>place_holder,:class=>'input-medium form-control', :maxlength=> 300)) + (content_tag :p do
|
text_area_tag(name1, value, @markup_options.merge(:placeholder=>place_holder,:class=>'input-medium form-control', :maxlength=> 300))
|
||||||
"(#{I18n.t("seminar.text_area_hint")})"
|
|
||||||
end)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -210,7 +208,7 @@ module Admin::SeminarsFieldHelper
|
||||||
def render_phone
|
def render_phone
|
||||||
a = control_group_wrapper_for_sm do |key,value|
|
a = control_group_wrapper_for_sm do |key,value|
|
||||||
place_holder= typeA["placeholder"][I18n.locale] rescue ''
|
place_holder= typeA["placeholder"][I18n.locale] rescue ''
|
||||||
text_field_tag(get_field_name_base, value, @markup_options.merge(:placeholder=>place_holder,:class=>'input-medium form-control', pattern: "[\\d\\+\\-\\(\\)]+", title: I18n.t("seminar.phone_hint"))) + (content_tag :p do
|
text_field_tag(get_field_name_base, value, @markup_options.merge(:placeholder=>place_holder,:class=>'input-medium form-control', pattern: "[\\d\\+\\-\\(\\)]{10,13}", title: I18n.t("seminar.phone_hint"))) + (content_tag :p do
|
||||||
"(#{I18n.t("seminar.phone_hint")})"
|
"(#{I18n.t("seminar.phone_hint")})"
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
|
@ -157,7 +157,7 @@
|
||||||
</div>
|
</div>
|
||||||
<% elsif signup_field.field_name == 'tel' %>
|
<% elsif signup_field.field_name == 'tel' %>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<%= f.text_field :tel, :class=>"input-medium form-control", :placeholder=> signup_field.placeholder[I18n.locale], :required => true, pattern: "[\\d\\+\\-\\(\\)]+", title: t("seminar.phone_hint") %>
|
<%= f.text_field :tel, :class=>"input-medium form-control", :placeholder=> signup_field.placeholder[I18n.locale], :required => true, pattern: "[\\d\\+\\-\\(\\)]{10,13}", title: t("seminar.phone_hint") %>
|
||||||
<p>(<%= t("seminar.phone_hint") %>)</p>
|
<p>(<%= t("seminar.phone_hint") %>)</p>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
@ -304,7 +304,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(function(){
|
(function(){
|
||||||
function check_repeat_value() {
|
function check_repeat_value(event) {
|
||||||
var validated = true;
|
var validated = true;
|
||||||
var all_values = $.map($('input[name^="seminar_signup_values"]:visible'), function(v) {
|
var all_values = $.map($('input[name^="seminar_signup_values"]:visible'), function(v) {
|
||||||
return [[v, $(v).val()]];
|
return [[v, $(v).val()]];
|
||||||
|
@ -332,7 +332,7 @@
|
||||||
pwd = $('#seminar_signup_password')
|
pwd = $('#seminar_signup_password')
|
||||||
|
|
||||||
$("form.content").submit(function(event) {
|
$("form.content").submit(function(event) {
|
||||||
if (!check_repeat_value()){
|
if (!check_repeat_value(event)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ($('*[name^="seminar_signup_values"]:visible')){
|
if ($('*[name^="seminar_signup_values"]:visible')){
|
||||||
|
|
|
@ -157,7 +157,7 @@
|
||||||
</div>
|
</div>
|
||||||
<% elsif signup_field.field_name == 'tel' %>
|
<% elsif signup_field.field_name == 'tel' %>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<%= f.text_field :tel, :class=>"input-medium form-control", :placeholder=> signup_field.placeholder[I18n.locale], :required => true, pattern: "[\\d\\+\\-\\(\\)]+", title: t("seminar.phone_hint") %>
|
<%= f.text_field :tel, :class=>"input-medium form-control", :placeholder=> signup_field.placeholder[I18n.locale], :required => true, pattern: "[\\d\\+\\-\\(\\)]{10,13}", title: t("seminar.phone_hint") %>
|
||||||
<p>(<%= t("seminar.phone_hint") %>)</p>
|
<p>(<%= t("seminar.phone_hint") %>)</p>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
@ -304,7 +304,7 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(function(){
|
(function(){
|
||||||
function check_repeat_value() {
|
function check_repeat_value(event) {
|
||||||
var validated = true;
|
var validated = true;
|
||||||
var all_values = $.map($('input[name^="seminar_signup_values"]:visible'), function(v) {
|
var all_values = $.map($('input[name^="seminar_signup_values"]:visible'), function(v) {
|
||||||
return [[v, $(v).val()]];
|
return [[v, $(v).val()]];
|
||||||
|
@ -332,7 +332,7 @@
|
||||||
pwd = $('#seminar_signup_password')
|
pwd = $('#seminar_signup_password')
|
||||||
|
|
||||||
$("form.content").submit(function(event) {
|
$("form.content").submit(function(event) {
|
||||||
if (!check_repeat_value()){
|
if (!check_repeat_value(event)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ($('*[name^="seminar_signup_values"]:visible')){
|
if ($('*[name^="seminar_signup_values"]:visible')){
|
||||||
|
|
|
@ -30,7 +30,7 @@ en:
|
||||||
presentation_type: Presentation
|
presentation_type: Presentation
|
||||||
seminar:
|
seminar:
|
||||||
repeat_hint: Input text must unique!
|
repeat_hint: Input text must unique!
|
||||||
phone_hint: Can only include number, +, -, and ()!
|
phone_hint: "Can only include number, +, -, and ()!(length: 10~13)"
|
||||||
email_hint: Email is not complete!
|
email_hint: Email is not complete!
|
||||||
text_area_hint: Limit 300 characters
|
text_area_hint: Limit 300 characters
|
||||||
file_limit_hint: File Size cannot larger than 20MB!
|
file_limit_hint: File Size cannot larger than 20MB!
|
||||||
|
|
|
@ -30,7 +30,7 @@ zh_tw:
|
||||||
presentation_type: 發表方式
|
presentation_type: 發表方式
|
||||||
seminar:
|
seminar:
|
||||||
repeat_hint: 輸入內容不能重複
|
repeat_hint: 輸入內容不能重複
|
||||||
phone_hint: 僅可輸入數字及+ - ()
|
phone_hint: "僅可輸入數字及+ - (),長度限制10~13"
|
||||||
email_hint: Email信箱不完整
|
email_hint: Email信箱不完整
|
||||||
text_area_hint: 字數最多只能300個字
|
text_area_hint: 字數最多只能300個字
|
||||||
file_limit_hint: 檔案不能超過20MB!
|
file_limit_hint: 檔案不能超過20MB!
|
||||||
|
|
Loading…
Reference in New Issue