From af7807ce9f9756f70e4fb55012394831b4ff282b Mon Sep 17 00:00:00 2001 From: decabeza Date: Tue, 27 Jun 2017 10:29:36 +0200 Subject: [PATCH] Updates custom note class to foundation help-text --- app/assets/stylesheets/layout.scss | 17 ----------- app/views/admin/poll/questions/_form.html.erb | 4 +-- app/views/admin/signature_sheets/new.html.erb | 4 +-- app/views/budgets/investments/_form.html.erb | 3 +- app/views/debates/_form.html.erb | 5 ++-- .../management/user_invites/new.html.erb | 6 ++-- .../organizations/registrations/new.html.erb | 6 ++-- app/views/proposals/_form.html.erb | 29 ++++++++++++------- app/views/shared/_suggest.html.erb | 24 ++++++++------- app/views/users/registrations/edit.html.erb | 12 +++++--- app/views/users/registrations/new.html.erb | 7 +++-- app/views/verification/residence/new.html.erb | 4 +-- app/views/verification/sms/new.html.erb | 6 ++-- config/locales/en.yml | 2 +- config/locales/es.yml | 2 +- config/locales/fr.yml | 4 +-- config/locales/nl.yml | 14 ++++----- config/locales/pt-BR.yml | 4 +-- 18 files changed, 81 insertions(+), 72 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 2bca33bf5..9673cdc88 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -825,23 +825,6 @@ form { margin: $line-height / 2 0 $line-height / 2 $line-height / 4; } - .note, - .note-marked { - display: block; - font-size: rem-calc(13); - margin-bottom: $line-height / 2; - } - - .note-marked { - background: #ff0; - display: inline-block; - - em { - background: #fff; - display: block; - } - } - .ckeditor { min-height: $line-height * 13; } diff --git a/app/views/admin/poll/questions/_form.html.erb b/app/views/admin/poll/questions/_form.html.erb index 0da36913a..959aa4ddf 100644 --- a/app/views/admin/poll/questions/_form.html.erb +++ b/app/views/admin/poll/questions/_form.html.erb @@ -17,8 +17,8 @@ <%= f.text_field :title, maxlength: Poll::Question.title_max_length %> <%= f.label :valid_answers %> -

<%= t("admin.questions.new.valid_answers_note") %>

- <%= f.text_field :valid_answers, label: false %> +

<%= t("admin.questions.new.valid_answers_note") %>

+ <%= f.text_field :valid_answers, label: false, aria: {describedby: "valid-answers-help-text"} %>
<%= f.cktext_area :description, diff --git a/app/views/admin/signature_sheets/new.html.erb b/app/views/admin/signature_sheets/new.html.erb index f471e1ea5..a1f2436bb 100644 --- a/app/views/admin/signature_sheets/new.html.erb +++ b/app/views/admin/signature_sheets/new.html.erb @@ -15,8 +15,8 @@
<%= f.label :document_numbers %> -

<%= t("admin.signature_sheets.new.document_numbers_note") %>

- <%= f.text_area :document_numbers, rows: "6", label: false %> +

<%= t("admin.signature_sheets.new.document_numbers_note") %>

+ <%= f.text_area :document_numbers, rows: "6", label: false, aria: {describedby: "document-numbers-help-text"} %> <%= f.submit(class: "button", value: t("admin.signature_sheets.new.submit")) %> <% end %> \ No newline at end of file diff --git a/app/views/budgets/investments/_form.html.erb b/app/views/budgets/investments/_form.html.erb index 28b47d726..94f6283e9 100644 --- a/app/views/budgets/investments/_form.html.erb +++ b/app/views/budgets/investments/_form.html.erb @@ -31,7 +31,7 @@
<%= f.label :tag_list, t("budgets.investments.form.tags_label") %> -

<%= t("budgets.investments.form.tags_instructions") %>

+

<%= t("budgets.investments.form.tags_instructions") %>

<%= f.label :category_tag_list, t("budgets.investments.form.tag_category_label") %> @@ -44,6 +44,7 @@ <%= f.text_field :tag_list, value: @investment.tag_list.to_s, label: false, placeholder: t("budgets.investments.form.tags_placeholder"), + aria: {describedby: "tags-list-help-text"}, class: 'js-tag-list' %>
diff --git a/app/views/debates/_form.html.erb b/app/views/debates/_form.html.erb index c88045f26..96a5337ca 100644 --- a/app/views/debates/_form.html.erb +++ b/app/views/debates/_form.html.erb @@ -17,11 +17,12 @@
<%= f.label :tag_list, t("debates.form.tags_label") %> -

<%= t("debates.form.tags_instructions") %>

+

<%= t("debates.form.tags_instructions") %>

<%= f.text_field :tag_list, value: @debate.tag_list.to_s, label: false, - placeholder: t("debates.form.tags_placeholder") %> + placeholder: t("debates.form.tags_placeholder"), + aria: {describedby: "tag-list-help-text"} %>
<% if @debate.new_record? %> diff --git a/app/views/management/user_invites/new.html.erb b/app/views/management/user_invites/new.html.erb index a49a84538..969ca8fdf 100644 --- a/app/views/management/user_invites/new.html.erb +++ b/app/views/management/user_invites/new.html.erb @@ -3,8 +3,10 @@ <%= form_tag management_user_invites_path do %> -

<%= t('management.user_invites.new.info') %>

- <%= text_area_tag "emails", nil, rows: 5, placeholder: t('management.user_invites.new.info') %> +

<%= t('management.user_invites.new.info') %>

+ <%= text_area_tag "emails", nil, rows: 5, + placeholder: t('management.user_invites.new.info'), + aria: {describedby: "emails-help-text"} %>
diff --git a/app/views/organizations/registrations/new.html.erb b/app/views/organizations/registrations/new.html.erb index e85bb5408..40d8c5d05 100644 --- a/app/views/organizations/registrations/new.html.erb +++ b/app/views/organizations/registrations/new.html.erb @@ -9,8 +9,10 @@ <%= f.fields_for :organization do |fo| %> <%= fo.text_field :name, autofocus: true, maxlength: Organization.name_max_length, placeholder: t("devise_views.organizations.registrations.new.organization_name_label") %> <%= fo.label :responsible_name %> -

<%= t("devise_views.organizations.registrations.new.responsible_name_note") %>

- <%= fo.text_field :responsible_name, placeholder: t("devise_views.organizations.registrations.new.responsible_name_label"), maxlength: Organization.responsible_name_max_length, label: false %> +

<%= t("devise_views.organizations.registrations.new.responsible_name_note") %>

+ <%= fo.text_field :responsible_name, placeholder: t("devise_views.organizations.registrations.new.responsible_name_label"), + maxlength: Organization.responsible_name_max_length, label: false, + aria: {describedby: "responsible-name-help-text"} %> <% end %> <%= f.email_field :email, placeholder: t("devise_views.organizations.registrations.new.email_label") %> diff --git a/app/views/proposals/_form.html.erb b/app/views/proposals/_form.html.erb index 3eda38cd1..232f65ac1 100644 --- a/app/views/proposals/_form.html.erb +++ b/app/views/proposals/_form.html.erb @@ -12,17 +12,21 @@
<%= f.label :question, t("proposals.form.proposal_question") %> - +

<%= t("proposals.form.proposal_question_example_html") %> - - <%= f.text_field :question, maxlength: Proposal.question_max_length, placeholder: t("proposals.form.proposal_question"), label: false %> +

+ <%= f.text_field :question, maxlength: Proposal.question_max_length, + placeholder: t("proposals.form.proposal_question"), + label: false, + aria: {describedby: "question-help-text"} %>
<%= f.label :summary, t("proposals.form.proposal_summary") %> -

<%= t("proposals.form.proposal_summary_note") %>

+

<%= t("proposals.form.proposal_summary_note") %>

<%= f.text_area :summary, rows: 4, maxlength: 200, label: false, - placeholder: t('proposals.form.proposal_summary') %> + placeholder: t('proposals.form.proposal_summary'), + aria: {describedby: "summary-help-text"} %>
@@ -33,8 +37,9 @@
<%= f.label :video_url, t("proposals.form.proposal_video_url") %> -

<%= t("proposals.form.proposal_video_url_note") %>

- <%= f.text_field :video_url, placeholder: t("proposals.form.proposal_video_url"), label: false %> +

<%= t("proposals.form.proposal_video_url_note") %>

+ <%= f.text_field :video_url, placeholder: t("proposals.form.proposal_video_url"), label: false, + aria: {describedby: "video-url-help-text"} %>
@@ -49,7 +54,7 @@
<%= f.label :tag_list, t("proposals.form.tags_label") %> -

<%= t("proposals.form.tags_instructions") %>

+

<%= t("proposals.form.tags_instructions") %>

<%= f.label :category_tag_list, t("proposals.form.tag_category_label") %> @@ -62,14 +67,16 @@ <%= f.text_field :tag_list, value: @proposal.tag_list.to_s, label: false, placeholder: t("proposals.form.tags_placeholder"), - class: 'js-tag-list' %> + class: 'js-tag-list', + aria: {describedby: "tag-list-help-text"} %>
<% if current_user.unverified? %>
<%= f.label :responsible_name, t("proposals.form.proposal_responsible_name") %> -

<%= t("proposals.form.proposal_responsible_name_note") %>

- <%= f.text_field :responsible_name, placeholder: t("proposals.form.proposal_responsible_name"), label: false %> +

<%= t("proposals.form.proposal_responsible_name_note") %>

+ <%= f.text_field :responsible_name, placeholder: t("proposals.form.proposal_responsible_name"), label: false, + aria: {describedby: "responsible-name-help-text"} %>
<% end %> diff --git a/app/views/shared/_suggest.html.erb b/app/views/shared/_suggest.html.erb index b71b1e919..3164594fc 100644 --- a/app/views/shared/_suggest.html.erb +++ b/app/views/shared/_suggest.html.erb @@ -1,10 +1,12 @@
<% if @search_terms && @resources.any? %>
-

- <%= t("shared.suggest.#{resource_name}.found", - count: @resources.count, - query: @search_terms)%> +

+ + <%= t("shared.suggest.#{resource_name}.found", + count: @resources.count, + query: @search_terms)%> +

    @@ -14,11 +16,13 @@
<% if @resources.count > @limit %> -

- <%= t("shared.suggest.#{resource_name}.message", - count: @resources.count, - query: @search_terms, - limit: @limit) %> +

+ + <%= t("shared.suggest.#{resource_name}.message", + count: @resources.count, + query: @search_terms, + limit: @limit) %> + <%= link_to t("shared.suggest.#{resource_name}.see_all"), polymorphic_url(resource_model, search: @search_terms)%>

@@ -26,4 +30,4 @@
<% end %> -
\ No newline at end of file +
diff --git a/app/views/users/registrations/edit.html.erb b/app/views/users/registrations/edit.html.erb index bbf33ccfa..7d80efda3 100644 --- a/app/views/users/registrations/edit.html.erb +++ b/app/views/users/registrations/edit.html.erb @@ -18,8 +18,10 @@
<%= f.label :password, t("devise_views.users.registrations.edit.password_label") %> -

<%= t("devise_views.users.registrations.edit.leave_blank") %>

- <%= f.password_field :password, autocomplete: "off", label: false, placeholder: t("devise_views.users.registrations.edit.password_label") %> +

<%= t("devise_views.users.registrations.edit.leave_blank") %>

+ <%= f.password_field :password, autocomplete: "off", label: false, + placeholder: t("devise_views.users.registrations.edit.password_label"), + aria: {describedby: "password-help-text"} %>
@@ -29,8 +31,10 @@
<%= f.label :current_password, t("devise_views.users.registrations.edit.current_password_label") %> -

<%= t("devise_views.users.registrations.edit.need_current") %>

- <%= f.password_field :current_password, label: false, autocomplete: "off", placeholder: t("devise_views.users.registrations.edit.current_password_label") %> +

<%= t("devise_views.users.registrations.edit.need_current") %>

+ <%= f.password_field :current_password, label: false, autocomplete: "off", + placeholder: t("devise_views.users.registrations.edit.current_password_label"), + aria: {describedby: "current-password-help-text"} %>
diff --git a/app/views/users/registrations/new.html.erb b/app/views/users/registrations/new.html.erb index 3ae3156f7..8e702a5f1 100644 --- a/app/views/users/registrations/new.html.erb +++ b/app/views/users/registrations/new.html.erb @@ -18,8 +18,11 @@ <%= f.hidden_field :locale, value: I18n.locale %> <%= f.label :username %> -

<%= t("devise_views.users.registrations.new.username_note") %>

- <%= f.text_field :username, autofocus: true, maxlength: User.username_max_length, placeholder: t("devise_views.users.registrations.new.username_label"), label: false %> +

<%= t("devise_views.users.registrations.new.username_note") %>

+ <%= f.text_field :username, autofocus: true, maxlength: User.username_max_length, + placeholder: t("devise_views.users.registrations.new.username_label"), + label: false, + aria: {describedby: "username-help-text"} %> <%= f.invisible_captcha :family_name %> diff --git a/app/views/verification/residence/new.html.erb b/app/views/verification/residence/new.html.erb index 703e4b98f..2159d1a01 100644 --- a/app/views/verification/residence/new.html.erb +++ b/app/views/verification/residence/new.html.erb @@ -76,9 +76,9 @@
<%= f.label t("verification.residence.new.postal_code") %> -

<%= t("verification.residence.new.postal_code_note") %>

+

<%= t("verification.residence.new.postal_code_note") %>

- <%= f.text_field :postal_code, label: false %> + <%= f.text_field :postal_code, label: false, aria: {describedby: "postal-code-help-text"} %>
diff --git a/app/views/verification/sms/new.html.erb b/app/views/verification/sms/new.html.erb index 06f679e36..820ed01fa 100644 --- a/app/views/verification/sms/new.html.erb +++ b/app/views/verification/sms/new.html.erb @@ -31,8 +31,10 @@
<%= 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, placeholder: t("verification.sms.new.phone_placeholder") %> +

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

+ <%= f.text_field :phone, label: false, + placeholder: t("verification.sms.new.phone_placeholder"), + aria: {describedby: "phone-help-text"} %>
<%= f.submit t("verification.sms.new.submit_button"), class: "button success" %> diff --git a/config/locales/en.yml b/config/locales/en.yml index dac7bc3be..33b457e32 100755 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -298,7 +298,7 @@ en: geozone: Scope of operation proposal_external_url: Link to additional documentation proposal_question: Proposal question - proposal_question_example_html: Must be summarised in one question with a Yes or No answer. E.g. 'Do you agree with the pedestrianisation of Calle Mayor?' + proposal_question_example_html: "Must be summarised in one question with a Yes or No answer.
E.g. 'Do you agree with the pedestrianisation of Calle Mayor?'" proposal_responsible_name: Full name of the person submitting the proposal proposal_responsible_name_note: "(individually or as representative of a collective; will not be displayed publically)" proposal_summary: Proposal summary diff --git a/config/locales/es.yml b/config/locales/es.yml index 5494ca497..d38184647 100755 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -298,7 +298,7 @@ es: geozone: "Ámbito de actuación" proposal_external_url: Enlace a documentación adicional proposal_question: Pregunta de la propuesta - proposal_question_example_html: Debe ser resumida en una pregunta cuya respuesta sea Sí o No. Ej. '¿Está usted de acuerdo en peatonalizar la calle Mayor?' + proposal_question_example_html: "Debe ser resumida en una pregunta cuya respuesta sea Sí o No.
Ej. '¿Está usted de acuerdo en peatonalizar la calle Mayor?'" proposal_responsible_name: Nombre y apellidos de la persona que hace esta propuesta proposal_responsible_name_note: "(individualmente o como representante de un colectivo; no se mostrará públicamente)" proposal_summary: Resumen de la propuesta diff --git a/config/locales/fr.yml b/config/locales/fr.yml index b978f70e2..e4d0f9a51 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -1249,8 +1249,8 @@ fr: proposal_external_url: Lien vers de la documentation complémentaire proposal_question: Question proposée proposal_question_example_html: 'Doit être résumé par une question appelant - à une réponse par oui ou par non. Exemple : ''Êtes-vous d''accord avec - la piétonnisation de Calle Mayor?''' + à une réponse par oui ou par non.
Exemple : ''Êtes-vous d''accord avec + la piétonnisation de Calle Mayor?' proposal_responsible_name: Nom complet de la personne qui soumet la proposition proposal_responsible_name_note: "(individuellement ou comme représentant d'un collectif; ne sera pas public)" diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 48e1bcdc9..62221c280 100755 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -14,7 +14,7 @@ nl: phone_number_label: Telefoonnummer public_activity_label: Mijn activiteiten zijn publiek save_changes_submit: Sla veranderingen op - subscription_to_website_newsletter_label: Stuur me email met relevante informatie over de website + subscription_to_website_newsletter_label: Stuur me email met relevante informatie over de website email_on_direct_message_label: Stuur me email naar aanleiding van directe boodschappen email_digest_label: Stuur me een samenvatting van meldingen naar aanleiding van voorstellen official_position_badge_label: Show official position badge @@ -179,7 +179,7 @@ nl: conditions: Gebruiksvoorwaarden consul: Consul consul_url: https://github.com/consul/consul - contact_us: Voor tech support klik + contact_us: Voor tech support klik copyright: Consul, %{year} description: Deze site gebruikt %{consul}; een %{open_source} toepassing. faq: hier @@ -217,7 +217,7 @@ nl: other: U heeft %{count} nieuwe meldingen no_notifications: "U heeft geen nieuwe meldingen" open: open - open_city_slogan_html: Er zijn steden die rechtstreeks door hun bewoners worden bestuurd, welke discussiëren over de onderwerpen waarover ze zich zorgen maken, welke voorstellen doen om hun leven te verbeteren en zelf beslissen welke daarvan zullen worden uitgevoerd. + open_city_slogan_html: Er zijn steden die rechtstreeks door hun bewoners worden bestuurd, welke discussiëren over de onderwerpen waarover ze zich zorgen maken, welke voorstellen doen om hun leven te verbeteren en zelf beslissen welke daarvan zullen worden uitgevoerd. open_city_title: De gemeente waar u van houdt is de gemeente waarin u meedenkt. open_gov: Open bestuur proposals: Voorstellen @@ -297,10 +297,10 @@ nl: done: Is gebeurt other: Anders form: - geozone: Regio + geozone: Regio proposal_external_url: Link naar meet informatie proposal_question: Vraag - proposal_question_example_html: Moet samengevat worden in een vraag met een ja/nee antwoord. E.g. 'Ben je het eens met autovrije Geldersekade?' + proposal_question_example_html: Moet samengevat worden in een vraag met een ja/nee antwoord.
E.g. 'Ben je het eens met autovrije Geldersekade?' proposal_responsible_name: Volledige naam van persoon die het voorstel doet proposal_responsible_name_note: "(individueel of als vertegenwoordiger van een collectief; niet publiek zichtbaar)" proposal_summary: Samenvatting voorstel @@ -506,7 +506,7 @@ nl: suggest: debate: found: - + one: "Er is een debat met de term '%{query}'; u kunt daar deelnemen in plaats van een nieuwe discussie te openen." other: "Er zijn discussies met de term '%{query}'; u kunt daar deelnemen in plaats van een nieuwe discussie te openen." message: "Er worden %{limit} uit %{count} discussies met de term '%{query}' getoond" @@ -636,7 +636,7 @@ nl: other: "%{count} Begrotingsvoorstellen" no_activity: Deze deelnemer heeft geen publieke activiteit no_private_messages: "Deze deelnemer ontvangt geen privé berichten." - private_activity: Deze deelnemer heeft besloten activiteiten niet te delen + private_activity: Deze deelnemer heeft besloten activiteiten niet te delen send_private_message: "Stuur privé bericht" proposals: send_notification: "Stuur melding" diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 90e4f35d8..69ca72c02 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -1267,8 +1267,8 @@ pt-BR: proposal_external_url: Link para documentação adicional proposal_question: Questão proposta proposal_question_example_html: 'Precisa ser sumarizado em uma questão com resposta - Sim ou Não. Ex.: ''Você concorda com a mudança da Calle Mayor como via - exclusiva de pedestres?''' + Sim ou Não.
Ex.: ''Você concorda com a mudança da Calle Mayor como via + exclusiva de pedestres?' proposal_responsible_name: Nome completo da pessoa que está submetendo a proposta proposal_responsible_name_note: "(indivudualmente ou como representante de um coletivo; não será mostrado publicamente)"