From e80d74ae7369fc1293e5195f29c4f6e8a9dcb87b Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 29 Jun 2022 17:02:43 +0100 Subject: [PATCH 1/1] Bootstrap 5: Add form-label class to hand-crafted form labels This is done automatically for forms created by bootstrap_form --- app/views/accounts/edit.html.erb | 6 +++--- app/views/sessions/new.html.erb | 4 ++-- app/views/user_blocks/edit.html.erb | 2 +- app/views/user_blocks/new.html.erb | 2 +- app/views/users/new.html.erb | 2 +- app/views/users/terms.html.erb | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/views/accounts/edit.html.erb b/app/views/accounts/edit.html.erb index cd53d294d..038f5c09f 100644 --- a/app/views/accounts/edit.html.erb +++ b/app/views/accounts/edit.html.erb @@ -17,7 +17,7 @@ <%= f.password_field :pass_crypt_confirmation, :value => "", :autocomplete => "new-password" %>
- +
<%= f.select(:auth_provider, Auth.providers, :hide_label => true, :wrapper => { :class => "col-auto mb-0" }) %> <%= f.text_field(:auth_uid, :hide_label => true, :wrapper => { :class => "col mb-0" }) %> @@ -26,7 +26,7 @@
- + <% if current_user.data_public? %> <%= t ".public editing.enabled" %> @@ -39,7 +39,7 @@
- + <% if current_user.terms_agreed? %> <%= t ".contributor terms.agreed" %> diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index 18f536206..ddebc55a4 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb @@ -25,7 +25,7 @@
- +
  • <%= link_to image_tag("openid.png", :alt => t(".auth_providers.openid.title")), "#", :id => "openid_open_url", :title => t(".auth_providers.openid.title") %>
  • @@ -48,7 +48,7 @@ <%= form_tag(auth_path(:provider => "openid"), :id => "openid_login_form") do %>
    - + <%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %> <%= text_field_tag("openid_url", "", :tabindex => 3, :autocomplete => "on", :class => "openid_url form-control") %> (" target="_new"><%= t "accounts.edit.openid.link text" %>) diff --git a/app/views/user_blocks/edit.html.erb b/app/views/user_blocks/edit.html.erb index 3591b9c0f..db7c5e057 100644 --- a/app/views/user_blocks/edit.html.erb +++ b/app/views/user_blocks/edit.html.erb @@ -15,7 +15,7 @@ <%= f.richtext_field :reason, :cols => 80, :rows => 20, :format => @user_block.reason_format %> <%= f.form_group do %> - <%= label_tag "user_block_period", t(".period") %>
    + <%= label_tag "user_block_period", t(".period"), :class => "form-label" %> <%= select_tag("user_block_period", options_for_select(UserBlock::PERIODS.collect { |h| [block_duration_in_words(h.hours), h.to_s] }, params[:user_block_period]), :class => "form-select") %> diff --git a/app/views/user_blocks/new.html.erb b/app/views/user_blocks/new.html.erb index c1195343b..c390134ba 100644 --- a/app/views/user_blocks/new.html.erb +++ b/app/views/user_blocks/new.html.erb @@ -9,7 +9,7 @@ <%= f.richtext_field :reason, :cols => 80, :rows => 20 %> <%= f.form_group do %> - <%= label_tag "user_block_period", t(".period") %>
    + <%= label_tag "user_block_period", t(".period"), :class => "form-label" %> <%= select_tag("user_block_period", options_for_select(UserBlock::PERIODS.collect { |h| [block_duration_in_words(h.hours), h.to_s] }, params[:user_block_period]), :class => "form-select") %> diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index 201597f4e..c53135678 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -26,7 +26,7 @@ <%= f.text_field :display_name, :help => t(".display name description"), :tabindex => 3 %>
    - +
    <%= f.select(:auth_provider, Auth.providers, :default => "", :hide_label => true, :wrapper => { :class => "col-auto mb-0" }, :tabindex => 4) %> <%= f.text_field(:auth_uid, :hide_label => true, :wrapper => { :class => "col mb-0" }, :tabindex => 5) %> diff --git a/app/views/users/terms.html.erb b/app/views/users/terms.html.erb index 58bddaca5..1f42e9085 100644 --- a/app/views/users/terms.html.erb +++ b/app/views/users/terms.html.erb @@ -16,7 +16,7 @@ <%= t ".heading_ct" %>

    <%= t ".contributor_terms_explain" %>

    -