From 9dce52a69a39fc5fa36e447cc2b1da636d6a3d8a Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Mon, 14 Mar 2016 14:19:18 +0100 Subject: [PATCH] Adds title on input checkboxes --- app/assets/stylesheets/layout.scss | 2 +- app/views/account/show.html.erb | 8 ++++---- app/views/admin/tags/index.html.erb | 4 ++-- app/views/comments/_form.html.erb | 4 ++-- app/views/debates/_form.html.erb | 4 ++-- app/views/devise/sessions/new.html.erb | 2 +- app/views/organizations/registrations/new.html.erb | 2 +- app/views/proposals/_form.html.erb | 4 ++-- app/views/spending_proposals/_form.html.erb | 2 +- app/views/users/registrations/new.html.erb | 2 +- app/views/valuation/spending_proposals/edit.html.erb | 8 ++++---- app/views/verification/residence/new.html.erb | 2 +- config/locales/devise_views.en.yml | 1 + config/locales/devise_views.es.yml | 1 + config/locales/en.yml | 1 + config/locales/es.yml | 1 + config/locales/verification.en.yml | 1 + config/locales/verification.es.yml | 1 + 18 files changed, 28 insertions(+), 22 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 55f8e5456..a9eedbcfe 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -739,7 +739,7 @@ form { min-height: $line-height*13; } - .checkbox { + .checkbox, .radio { display: inline-block; font-weight: normal; line-height: $line-height; diff --git a/app/views/account/show.html.erb b/app/views/account/show.html.erb index f13916d77..f0d2b6abc 100644 --- a/app/views/account/show.html.erb +++ b/app/views/account/show.html.erb @@ -33,7 +33,7 @@
<%= f.label :public_activity do %> - <%= f.check_box :public_activity, label: false %> + <%= f.check_box :public_activity, title: t('account.show.public_activity_label'), label: false %> <%= t("account.show.public_activity_label") %> <% end %>
@@ -42,21 +42,21 @@
<%= f.label :email_on_comment do %> - <%= f.check_box :email_on_comment, label: false %> + <%= f.check_box :email_on_comment, title: t('account.show.email_on_comment_label'), label: false %> <%= t("account.show.email_on_comment_label") %> <% end %>
<%= f.label :email_on_comment_reply do %> - <%= f.check_box :email_on_comment_reply, label: false %> + <%= f.check_box :email_on_comment_reply, title: t('account.show.email_on_comment_reply_label'), label: false %> <%= t("account.show.email_on_comment_reply_label") %> <% end %>
<%= f.label :email_newsletter_subscribed do %> - <%= f.check_box :newsletter, label: false %> + <%= f.check_box :newsletter, title: t('account.show.subscription_to_website_newsletter_label'), label: false %> <%= t("account.show.subscription_to_website_newsletter_label") %> <% end %>
diff --git a/app/views/admin/tags/index.html.erb b/app/views/admin/tags/index.html.erb index 707235265..5e5ca5c99 100644 --- a/app/views/admin/tags/index.html.erb +++ b/app/views/admin/tags/index.html.erb @@ -10,7 +10,7 @@ @@ -34,7 +34,7 @@ <%= f.label "featured_#{tag.id}" do %> - <%= f.check_box :featured, label: false, id: "tag_featured_#{tag.id}", class: "inline-block" %> + <%= f.check_box :featured, title: t('admin.tags.mark_as_featured'), label: false, id: "tag_featured_#{tag.id}", class: "inline-block" %> <%= t("admin.tags.mark_as_featured") %> <% end %> diff --git a/app/views/comments/_form.html.erb b/app/views/comments/_form.html.erb index 1dd371566..601e45a47 100644 --- a/app/views/comments/_form.html.erb +++ b/app/views/comments/_form.html.erb @@ -12,13 +12,13 @@ <% if can? :comment_as_moderator, commentable %>
- <%= f.check_box :as_moderator, id: "comment-as-moderator-#{css_id}", label: false %> + <%= f.check_box :as_moderator, title: t('comments.form.comment_as_moderator'), id: "comment-as-moderator-#{css_id}", label: false %> <%= label_tag "comment-as-moderator-#{css_id}", t("comments.form.comment_as_moderator"), class: "checkbox" %>
<% end %> <% if can? :comment_as_administrator, commentable %>
- <%= f.check_box :as_administrator, id: "comment-as-administrator-#{css_id}",label: false %> + <%= f.check_box :as_administrator, title: t('comments.form.comment_as_admin'), id: "comment-as-administrator-#{css_id}",label: false %> <%= label_tag "comment-as-administrator-#{css_id}", t("comments.form.comment_as_admin"), class: "checkbox" %>
<% end %> diff --git a/app/views/debates/_form.html.erb b/app/views/debates/_form.html.erb index 9187f370b..be5c92306 100644 --- a/app/views/debates/_form.html.erb +++ b/app/views/debates/_form.html.erb @@ -3,7 +3,7 @@
<%= f.label :title, t("debates.form.debate_title") %> - <%= f.text_field :title, maxlength: Debate.title_max_length, placeholder: t("debates.form.debate_title"), label: false, data: {js_suggest_result: "js_suggest_result", js_suggest: "#js-suggest", js_url: suggest_debates_path}%> + <%= f.text_field :title, maxlength: Debate.title_max_length, placeholder: t("debates.form.debate_title"), label: false, data: {js_suggest_result: "js_suggest_result", js_suggest: "#js-suggest", js_url: suggest_debates_path}%>
@@ -22,7 +22,7 @@
<% if @debate.new_record? %> <%= f.label :terms_of_service do %> - <%= f.check_box :terms_of_service, label: false %> + <%= f.check_box :terms_of_service, title: t('form.accept_terms_title'), label: false %> <%= t("form.accept_terms", policy: link_to(t("form.policy"), "/privacy", target: "blank"), diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 5e787440f..2abd9aebd 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -22,7 +22,7 @@ <% if devise_mapping.rememberable? -%>
<%= f.label :remember_me do %> - <%= f.check_box :remember_me, label: false, tabindex: "4" %> + <%= f.check_box :remember_me, title: t('devise_views.sessions.new.remember_me'), label: false, tabindex: "4" %> <%= t("devise_views.sessions.new.remember_me") %> <% end %>
diff --git a/app/views/organizations/registrations/new.html.erb b/app/views/organizations/registrations/new.html.erb index 8058efa8a..2994bf582 100644 --- a/app/views/organizations/registrations/new.html.erb +++ b/app/views/organizations/registrations/new.html.erb @@ -28,7 +28,7 @@ <%= f.label :terms_of_service do %> - <%= f.check_box :terms_of_service, label: false %> + <%= f.check_box :terms_of_service, title: t('devise_views.users.registrations.new.terms_title'), label: false %> <%= t("devise_views.users.registrations.new.terms", terms: link_to(t("devise_views.users.registrations.new.terms_link"), "/conditions", target: "_blank")).html_safe %> diff --git a/app/views/proposals/_form.html.erb b/app/views/proposals/_form.html.erb index 447b52fe5..2f92f2781 100644 --- a/app/views/proposals/_form.html.erb +++ b/app/views/proposals/_form.html.erb @@ -4,7 +4,7 @@
<%= f.label :title, t("proposals.form.proposal_title") %> - <%= f.text_field :title, maxlength: Proposal.title_max_length, placeholder: t("proposals.form.proposal_title"), label: false, data: {js_suggest_result: "js_suggest_result", js_suggest: "#js-suggest", js_url: suggest_proposals_path}%> + <%= f.text_field :title, maxlength: Proposal.title_max_length, placeholder: t("proposals.form.proposal_title"), label: false, data: {js_suggest_result: "js_suggest_result", js_suggest: "#js-suggest", js_url: suggest_proposals_path}%>
@@ -74,7 +74,7 @@
<% if @proposal.new_record? %> <%= f.label :terms_of_service do %> - <%= f.check_box :terms_of_service, label: false %> + <%= f.check_box :terms_of_service, title: t('form.accept_terms_title'), label: false %> <%= t("form.accept_terms", policy: link_to(t("form.policy"), "/privacy", target: "blank"), diff --git a/app/views/spending_proposals/_form.html.erb b/app/views/spending_proposals/_form.html.erb index c8f4d3687..0d6ef0402 100644 --- a/app/views/spending_proposals/_form.html.erb +++ b/app/views/spending_proposals/_form.html.erb @@ -30,7 +30,7 @@
<% if @spending_proposal.new_record? %> <%= f.label :terms_of_service do %> - <%= f.check_box :terms_of_service, label: false %> + <%= f.check_box :terms_of_service, title: t('form.accept_terms_title'), label: false %> <%= t("form.accept_terms", policy: link_to(t("form.policy"), "/privacy", target: "blank"), diff --git a/app/views/users/registrations/new.html.erb b/app/views/users/registrations/new.html.erb index def7266a6..e25d9f9e6 100644 --- a/app/views/users/registrations/new.html.erb +++ b/app/views/users/registrations/new.html.erb @@ -38,7 +38,7 @@ <%= f.simple_captcha input_html: {required: false} %> <%= f.label :terms_of_service do %> - <%= f.check_box :terms_of_service, label: false %> + <%= f.check_box :terms_of_service, title: t('devise_views.users.registrations.new.terms_title'), label: false %> <%= t("devise_views.users.registrations.new.terms", terms: link_to(t("devise_views.users.registrations.new.terms_link"), "/conditions", target: "_blank")).html_safe %> diff --git a/app/views/valuation/spending_proposals/edit.html.erb b/app/views/valuation/spending_proposals/edit.html.erb index 0cd9f5f96..337f8fa16 100644 --- a/app/views/valuation/spending_proposals/edit.html.erb +++ b/app/views/valuation/spending_proposals/edit.html.erb @@ -8,21 +8,21 @@
<%= t('valuation.spending_proposals.edit.feasibility') %>
- + <%= f.radio_button :feasible, :nil, label: false, checked: @spending_proposal.feasible.nil? %> <%= f.label :feasible_nil, t('valuation.spending_proposals.edit.undefined_feasible') %>
- + <%= f.radio_button :feasible, true, value: true, label: false %> <%= f.label :feasible_true, t('valuation.spending_proposals.edit.feasible') %>
- + <%= f.radio_button :feasible, false, value: false, label: false %> <%= f.label :feasible_false, t('valuation.spending_proposals.edit.not_feasible') %> @@ -67,7 +67,7 @@
<%= f.label :valuation_finished do %> - <%= f.check_box :valuation_finished, label: false %> + <%= f.check_box :valuation_finished, title: t('valuation.spending_proposals.edit.valuation_finished'), label: false %> <%= t("valuation.spending_proposals.edit.valuation_finished") %> <% end %>
diff --git a/app/views/verification/residence/new.html.erb b/app/views/verification/residence/new.html.erb index 439138627..40c12b783 100644 --- a/app/views/verification/residence/new.html.erb +++ b/app/views/verification/residence/new.html.erb @@ -67,7 +67,7 @@
<%= f.label :terms_of_service do %> - <%= f.check_box :terms_of_service, label: false %> + <%= f.check_box :terms_of_service, title: t('verification.residence.new.accept_terms_text_title'), label: false %> <%= t("verification.residence.new.accept_terms_text", terms_url: link_to(t("verification.residence.new.terms"), "/census_terms", diff --git a/config/locales/devise_views.en.yml b/config/locales/devise_views.en.yml index 7272da0a5..07d192628 100755 --- a/config/locales/devise_views.en.yml +++ b/config/locales/devise_views.en.yml @@ -117,6 +117,7 @@ en: submit: Register terms: By registering you accept the %{terms} terms_link: terms and conditions of use + terms_title: By registering you accept the terms and conditions of use title: Register username_is_available: "Username available" username_is_not_available: "Username already in use" diff --git a/config/locales/devise_views.es.yml b/config/locales/devise_views.es.yml index abed497cd..0b96a2f64 100644 --- a/config/locales/devise_views.es.yml +++ b/config/locales/devise_views.es.yml @@ -117,6 +117,7 @@ es: submit: Registrarse terms: Al registrarte aceptas las %{terms} terms_link: condiciones de uso + terms_title: Al registrarte aceptas las condiciones de uso title: Registrarse username_is_available: "Nombre de usuario disponible" username_is_not_available: "Nombre de usuario ya existente" diff --git a/config/locales/en.yml b/config/locales/en.yml index 550225fa8..7f5f4bf87 100755 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -141,6 +141,7 @@ en: user_not_found: User not found form: accept_terms: I agree to the %{policy} and the %{conditions} + accept_terms_title: I agree to the Privacy Policy and the Terms and conditions of use conditions: Terms and conditions of use debate: Debate error: error diff --git a/config/locales/es.yml b/config/locales/es.yml index 7e66e1c14..0cc3614b7 100755 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -141,6 +141,7 @@ es: user_not_found: No se encontró el usuario form: accept_terms: Acepto la %{policy} y las %{conditions} + accept_terms_title: Acepto la Política de privacidad y las Condiciones de uso conditions: Condiciones de uso debate: el debate error: error diff --git a/config/locales/verification.en.yml b/config/locales/verification.en.yml index 822baa411..4c78108ba 100755 --- a/config/locales/verification.en.yml +++ b/config/locales/verification.en.yml @@ -51,6 +51,7 @@ en: success: Residence verified new: accept_terms_text: I accept %{terms_url} of the Census + accept_terms_text_title: I accept the terms and conditions of access of the Census date_of_birth: Date of birth document_number: Document number document_type: diff --git a/config/locales/verification.es.yml b/config/locales/verification.es.yml index ba4692f32..7434ec5b7 100644 --- a/config/locales/verification.es.yml +++ b/config/locales/verification.es.yml @@ -51,6 +51,7 @@ es: success: Residencia verificada new: accept_terms_text: Acepto %{terms_url} al Padrón + accept_terms_text_title: Acepto los términos de acceso al Padrón date_of_birth: Fecha de nacimiento document_number: Número de documento document_type: