From 2b15ecb5fec0e9ac7ec40a8310d8ad544c86e3c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Wed, 11 Oct 2023 08:47:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E8=80=85=E9=AB=94=E9=A9=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/admin/seminars_field_helper.rb | 6 ++---- app/views/seminars/edit_login_seminar_signup.html.erb | 6 +++--- app/views/seminars/show.html.erb | 6 +++--- config/locales/en.yml | 2 +- config/locales/zh_tw.yml | 2 +- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/app/helpers/admin/seminars_field_helper.rb b/app/helpers/admin/seminars_field_helper.rb index f6e53b8..b520100 100644 --- a/app/helpers/admin/seminars_field_helper.rb +++ b/app/helpers/admin/seminars_field_helper.rb @@ -169,9 +169,7 @@ module Admin::SeminarsFieldHelper key = can_muti_lang_input_for_sm? ? "#{key}" : I18n.locale place_holder= typeD["placeholder"][key] rescue '' 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 - "(#{I18n.t("seminar.text_area_hint")})" - end) + text_area_tag(name1, value, @markup_options.merge(:placeholder=>place_holder,:class=>'input-medium form-control', :maxlength=> 300)) end end @@ -210,7 +208,7 @@ module Admin::SeminarsFieldHelper def render_phone a = control_group_wrapper_for_sm do |key,value| 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")})" end) end diff --git a/app/views/seminars/edit_login_seminar_signup.html.erb b/app/views/seminars/edit_login_seminar_signup.html.erb index b66faf9..2e95b22 100644 --- a/app/views/seminars/edit_login_seminar_signup.html.erb +++ b/app/views/seminars/edit_login_seminar_signup.html.erb @@ -157,7 +157,7 @@ <% elsif signup_field.field_name == 'tel' %>
- <%= 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") %>

(<%= t("seminar.phone_hint") %>)

<% else %> @@ -304,7 +304,7 @@