From 7d32f2a4b0a33b7f9485b7b85be1dd927d3d0733 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Fri, 15 Apr 2016 13:09:54 +0200 Subject: [PATCH] Adds label and placeholder for international numbers verification --- app/views/verification/sms/new.html.erb | 5 +++-- config/locales/verification.en.yml | 2 ++ config/locales/verification.es.yml | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/views/verification/sms/new.html.erb b/app/views/verification/sms/new.html.erb index 6019c89cd..4af6a4dfb 100644 --- a/app/views/verification/sms/new.html.erb +++ b/app/views/verification/sms/new.html.erb @@ -28,9 +28,10 @@ <%= render "shared/errors", resource: @sms %>
- <%= f.label t("verification.sms.new.phone") %> + <%= f.label :phone, t("verification.sms.new.phone"), class: "inline-block" %> + <%= t("verification.sms.new.phone_format_html") %>

<%= t("verification.sms.new.phone_note") %>

- <%= f.text_field :phone, label: false %> + <%= f.text_field :phone, label: false, placeholder: t("verification.sms.new.phone_placeholder") %>
<%= f.submit t("verification.sms.new.submit_button"), class: "button success" %> diff --git a/config/locales/verification.en.yml b/config/locales/verification.en.yml index 24c9ae928..8b7617f1a 100755 --- a/config/locales/verification.en.yml +++ b/config/locales/verification.en.yml @@ -83,7 +83,9 @@ en: title: Security code confirmation new: phone: Enter your mobile phone number to receive the code + phone_format_html: "(Example: 612345678 or +34612345678)" phone_note: We only user your phone for send to you a code, we never contact to you. + phone_placeholder: "Example: 612345678 or +34612345678" submit_button: Send title: Send confirmation code update: diff --git a/config/locales/verification.es.yml b/config/locales/verification.es.yml index be676ab0f..7c27584a7 100644 --- a/config/locales/verification.es.yml +++ b/config/locales/verification.es.yml @@ -83,7 +83,9 @@ es: title: SMS de confirmación new: phone: Introduce tu teléfono móvil para recibir el código + phone_format_html: "(Ejemplo: 612345678 ó +34612345678)" phone_note: Sólo usaremos tu teléfono para enviarte un código, nunca te contactaremos. + phone_placeholder: "Ejemplo: 612345678 ó +34612345678" submit_button: Enviar title: SMS de confirmación update: