Adds title on input checkboxes

This commit is contained in:
Alberto Garcia Cabeza
2016-03-14 14:19:18 +01:00
parent 6f74f8ab8a
commit 9dce52a69a
18 changed files with 28 additions and 22 deletions

View File

@@ -739,7 +739,7 @@ form {
min-height: $line-height*13; min-height: $line-height*13;
} }
.checkbox { .checkbox, .radio {
display: inline-block; display: inline-block;
font-weight: normal; font-weight: normal;
line-height: $line-height; line-height: $line-height;

View File

@@ -33,7 +33,7 @@
<div> <div>
<%= f.label :public_activity do %> <%= 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 %>
<span class="checkbox"><%= t("account.show.public_activity_label") %></span> <span class="checkbox"><%= t("account.show.public_activity_label") %></span>
<% end %> <% end %>
</div> </div>
@@ -42,21 +42,21 @@
<div> <div>
<%= f.label :email_on_comment do %> <%= 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 %>
<span class="checkbox"><%= t("account.show.email_on_comment_label") %></span> <span class="checkbox"><%= t("account.show.email_on_comment_label") %></span>
<% end %> <% end %>
</div> </div>
<div> <div>
<%= f.label :email_on_comment_reply do %> <%= 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 %>
<span class="checkbox"><%= t("account.show.email_on_comment_reply_label") %></span> <span class="checkbox"><%= t("account.show.email_on_comment_reply_label") %></span>
<% end %> <% end %>
</div> </div>
<div> <div>
<%= f.label :email_newsletter_subscribed do %> <%= 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 %>
<span class="checkbox"><%= t("account.show.subscription_to_website_newsletter_label") %></span> <span class="checkbox"><%= t("account.show.subscription_to_website_newsletter_label") %></span>
<% end %> <% end %>
</div> </div>

View File

@@ -10,7 +10,7 @@
<div class="is-featured small-12 medium-6 column"> <div class="is-featured small-12 medium-6 column">
<%= f.label :featured do %> <%= f.label :featured do %>
<%= f.check_box :featured, label: false %> <%= f.check_box :featured, title: t('admin.tags.mark_as_featured'), label: false %>
<span class="checkbox"><%= t("admin.tags.mark_as_featured") %></span> <span class="checkbox"><%= t("admin.tags.mark_as_featured") %></span>
<% end %> <% end %>
</div> </div>
@@ -34,7 +34,7 @@
<span class="float-left"> <span class="float-left">
<%= f.label "featured_#{tag.id}" do %> <%= 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" %>
<span class="checkbox inline-block"><%= t("admin.tags.mark_as_featured") %></span> <span class="checkbox inline-block"><%= t("admin.tags.mark_as_featured") %></span>
<% end %> <% end %>
</span> </span>

View File

@@ -12,13 +12,13 @@
<% if can? :comment_as_moderator, commentable %> <% if can? :comment_as_moderator, commentable %>
<div class="float-right"> <div class="float-right">
<%= 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" %> <%= label_tag "comment-as-moderator-#{css_id}", t("comments.form.comment_as_moderator"), class: "checkbox" %>
</div> </div>
<% end %> <% end %>
<% if can? :comment_as_administrator, commentable %> <% if can? :comment_as_administrator, commentable %>
<div class="float-right"> <div class="float-right">
<%= 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" %> <%= label_tag "comment-as-administrator-#{css_id}", t("comments.form.comment_as_admin"), class: "checkbox" %>
</div> </div>
<% end %> <% end %>

View File

@@ -22,7 +22,7 @@
<div class="small-12 column"> <div class="small-12 column">
<% if @debate.new_record? %> <% if @debate.new_record? %>
<%= f.label :terms_of_service do %> <%= 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 %>
<span class="checkbox"> <span class="checkbox">
<%= t("form.accept_terms", <%= t("form.accept_terms",
policy: link_to(t("form.policy"), "/privacy", target: "blank"), policy: link_to(t("form.policy"), "/privacy", target: "blank"),

View File

@@ -22,7 +22,7 @@
<% if devise_mapping.rememberable? -%> <% if devise_mapping.rememberable? -%>
<div class="small-12 columns"> <div class="small-12 columns">
<%= f.label :remember_me do %> <%= 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" %>
<span class="checkbox"><%= t("devise_views.sessions.new.remember_me") %></span> <span class="checkbox"><%= t("devise_views.sessions.new.remember_me") %></span>
<% end %> <% end %>
</div> </div>

View File

@@ -28,7 +28,7 @@
<%= f.label :terms_of_service do %> <%= 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 %>
<span class="checkbox"> <span class="checkbox">
<%= t("devise_views.users.registrations.new.terms", <%= t("devise_views.users.registrations.new.terms",
terms: link_to(t("devise_views.users.registrations.new.terms_link"), "/conditions", target: "_blank")).html_safe %></span> terms: link_to(t("devise_views.users.registrations.new.terms_link"), "/conditions", target: "_blank")).html_safe %></span>

View File

@@ -74,7 +74,7 @@
<div class="small-12 column"> <div class="small-12 column">
<% if @proposal.new_record? %> <% if @proposal.new_record? %>
<%= f.label :terms_of_service do %> <%= 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 %>
<span class="checkbox"> <span class="checkbox">
<%= t("form.accept_terms", <%= t("form.accept_terms",
policy: link_to(t("form.policy"), "/privacy", target: "blank"), policy: link_to(t("form.policy"), "/privacy", target: "blank"),

View File

@@ -30,7 +30,7 @@
<div class="small-12 column"> <div class="small-12 column">
<% if @spending_proposal.new_record? %> <% if @spending_proposal.new_record? %>
<%= f.label :terms_of_service do %> <%= 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 %>
<span class="checkbox"> <span class="checkbox">
<%= t("form.accept_terms", <%= t("form.accept_terms",
policy: link_to(t("form.policy"), "/privacy", target: "blank"), policy: link_to(t("form.policy"), "/privacy", target: "blank"),

View File

@@ -38,7 +38,7 @@
<%= f.simple_captcha input_html: {required: false} %> <%= f.simple_captcha input_html: {required: false} %>
<%= f.label :terms_of_service do %> <%= 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 %>
<span class="checkbox"> <span class="checkbox">
<%= t("devise_views.users.registrations.new.terms", <%= t("devise_views.users.registrations.new.terms",
terms: link_to(t("devise_views.users.registrations.new.terms_link"), "/conditions", target: "_blank")).html_safe %></span> terms: link_to(t("devise_views.users.registrations.new.terms_link"), "/conditions", target: "_blank")).html_safe %></span>

View File

@@ -8,21 +8,21 @@
<fieldset class="fieldset"> <fieldset class="fieldset">
<legend><%= t('valuation.spending_proposals.edit.feasibility') %></legend> <legend><%= t('valuation.spending_proposals.edit.feasibility') %></legend>
<div class="small-4 column"> <div class="small-4 column">
<span class="checkbox"> <span class="radio">
<%= f.radio_button :feasible, :nil, label: false, checked: @spending_proposal.feasible.nil? %> <%= f.radio_button :feasible, :nil, label: false, checked: @spending_proposal.feasible.nil? %>
<%= f.label :feasible_nil, t('valuation.spending_proposals.edit.undefined_feasible') %> <%= f.label :feasible_nil, t('valuation.spending_proposals.edit.undefined_feasible') %>
</span> </span>
</div> </div>
<div class="small-4 column"> <div class="small-4 column">
<span class="checkbox"> <span class="radio">
<%= f.radio_button :feasible, true, value: true, label: false %> <%= f.radio_button :feasible, true, value: true, label: false %>
<%= f.label :feasible_true, t('valuation.spending_proposals.edit.feasible') %> <%= f.label :feasible_true, t('valuation.spending_proposals.edit.feasible') %>
</span> </span>
</div> </div>
<div class="small-4 column"> <div class="small-4 column">
<span class="checkbox"> <span class="radio">
<%= f.radio_button :feasible, false, value: false, label: false %> <%= f.radio_button :feasible, false, value: false, label: false %>
<%= f.label :feasible_false, t('valuation.spending_proposals.edit.not_feasible') %> <%= f.label :feasible_false, t('valuation.spending_proposals.edit.not_feasible') %>
</span> </span>
@@ -67,7 +67,7 @@
<div class="row"> <div class="row">
<div class="small-12 medium-8 column"> <div class="small-12 medium-8 column">
<%= f.label :valuation_finished do %> <%= 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 %>
<span class="checkbox"><%= t("valuation.spending_proposals.edit.valuation_finished") %></span> <span class="checkbox"><%= t("valuation.spending_proposals.edit.valuation_finished") %></span>
<% end %> <% end %>
</div> </div>

View File

@@ -67,7 +67,7 @@
<div class="small-12"> <div class="small-12">
<%= f.label :terms_of_service do %> <%= 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 %>
<span class="checkbox"> <span class="checkbox">
<%= t("verification.residence.new.accept_terms_text", <%= t("verification.residence.new.accept_terms_text",
terms_url: link_to(t("verification.residence.new.terms"), "/census_terms", terms_url: link_to(t("verification.residence.new.terms"), "/census_terms",

View File

@@ -117,6 +117,7 @@ en:
submit: Register submit: Register
terms: By registering you accept the %{terms} terms: By registering you accept the %{terms}
terms_link: terms and conditions of use terms_link: terms and conditions of use
terms_title: By registering you accept the terms and conditions of use
title: Register title: Register
username_is_available: "Username available" username_is_available: "Username available"
username_is_not_available: "Username already in use" username_is_not_available: "Username already in use"

View File

@@ -117,6 +117,7 @@ es:
submit: Registrarse submit: Registrarse
terms: Al registrarte aceptas las %{terms} terms: Al registrarte aceptas las %{terms}
terms_link: condiciones de uso terms_link: condiciones de uso
terms_title: Al registrarte aceptas las condiciones de uso
title: Registrarse title: Registrarse
username_is_available: "Nombre de usuario disponible" username_is_available: "Nombre de usuario disponible"
username_is_not_available: "Nombre de usuario ya existente" username_is_not_available: "Nombre de usuario ya existente"

View File

@@ -141,6 +141,7 @@ en:
user_not_found: User not found user_not_found: User not found
form: form:
accept_terms: I agree to the %{policy} and the %{conditions} 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 conditions: Terms and conditions of use
debate: Debate debate: Debate
error: error error: error

View File

@@ -141,6 +141,7 @@ es:
user_not_found: No se encontró el usuario user_not_found: No se encontró el usuario
form: form:
accept_terms: Acepto la %{policy} y las %{conditions} 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 conditions: Condiciones de uso
debate: el debate debate: el debate
error: error error: error

View File

@@ -51,6 +51,7 @@ en:
success: Residence verified success: Residence verified
new: new:
accept_terms_text: I accept %{terms_url} of the Census 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 date_of_birth: Date of birth
document_number: Document number document_number: Document number
document_type: document_type:

View File

@@ -51,6 +51,7 @@ es:
success: Residencia verificada success: Residencia verificada
new: new:
accept_terms_text: Acepto %{terms_url} al Padrón 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 date_of_birth: Fecha de nacimiento
document_number: Número de documento document_number: Número de documento
document_type: document_type: