From e8767481e921e0c5ad0554d38311c9d87c5b3398 Mon Sep 17 00:00:00 2001 From: Alexander Brandon Coles Date: Thu, 7 May 2026 09:31:10 +0100 Subject: [PATCH] [#70166] Fix accessibility errors found by ERB Lint (#21503) * Fix GitHub/NoTitleAttribute, LinkHasHref errors - Replaces `title` attribute with `aria-label` for interactive elements. - Removes `title` from non-interactive elements. - Converts `` tags without proper `href` to ` + <%= + render( + Primer::Beta::IconButton.new( + icon: :x, + size: :small, + scheme: :invisible, + type: :button, + aria: { label: t(:button_close) }, + data: { action: "click->hide-sections#hide" } + ) + ) + %> <% end %> @@ -172,7 +177,7 @@
diff --git a/app/views/custom_fields/_custom_options.html.erb b/app/views/custom_fields/_custom_options.html.erb index fa89235fbe6..0e3c58ddc16 100644 --- a/app/views/custom_fields/_custom_options.html.erb +++ b/app/views/custom_fields/_custom_options.html.erb @@ -1,4 +1,4 @@ -<%#-- copyright +<%# -- copyright OpenProject is an open source project management software. Copyright (C) the OpenProject GmbH @@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See COPYRIGHT and LICENSE files for more details. -++#%> +++# %> <% content_controller "admin--custom-fields", "admin--custom-fields-multi-select-value": @custom_field.multi_value? %> @@ -103,39 +103,32 @@ See COPYRIGHT and LICENSE files for more details. no_label: true %> - - - <%= op_icon("icon-context icon-sort-up icon-small") %> - - - <%= op_icon("icon-context icon-arrow-up2 icon-small") %> - - - <%= op_icon("icon-context icon-arrow-down2 icon-small") %> - - - <%= op_icon("icon-context icon-sort-down icon-small") %> - - + + <%= + render(Primer::Beta::ButtonGroup.new(scheme: :invisible, size: :small)) do |component| + component.with_button( + icon: :"move-to-top", + "aria-label": t(:label_sort_highest), + data: { action: "admin--custom-fields#moveRowToTheTop" } + ) + component.with_button( + icon: :"chevron-up", + "aria-label": t(:label_sort_higher), + data: { action: "admin--custom-fields#moveRowUp" } + ) + component.with_button( + icon: :"chevron-down", + "aria-label": t(:label_sort_lower), + data: { action: "admin--custom-fields#moveRowDown" } + ) + component.with_button( + icon: :"move-to-bottom", + "aria-label": t(:label_sort_lowest), + data: { action: "admin--custom-fields#moveRowToTheBottom" } + ) + end + %> + <%= link_to "", @@ -146,7 +139,7 @@ See COPYRIGHT and LICENSE files for more details. turbo_confirm: t(:"custom_fields.confirm_destroy_option") }, class: "icon icon-delete delete-custom-option", - title: t(:button_delete) %> + "aria-label": t(:button_delete) %> <% end %> diff --git a/app/views/filters/list/_select.html.erb b/app/views/filters/list/_select.html.erb index 38160cf0723..da65efe09c1 100644 --- a/app/views/filters/list/_select.html.erb +++ b/app/views/filters/list/_select.html.erb @@ -22,7 +22,7 @@ tabindex="0" data-action="click->filter--filters-form#toggleMultiSelect" data-filter--filters-form-filter-name-param="<%= filter.name %>"> - icon4" title="<%= t(:label_enable_multi_select) %>"> + icon4"> <%= t(:label_enable_multi_select) %> diff --git a/app/views/ldap_auth_sources/_form.html.erb b/app/views/ldap_auth_sources/_form.html.erb index 13beef62bcc..b578890cbfd 100644 --- a/app/views/ldap_auth_sources/_form.html.erb +++ b/app/views/ldap_auth_sources/_form.html.erb @@ -1,4 +1,4 @@ -<%#-- copyright +<%# -- copyright OpenProject is an open source project management software. Copyright (C) the OpenProject GmbH @@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See COPYRIGHT and LICENSE files for more details. -++#%> +++# %> <%# needs locals: @@ -35,29 +35,24 @@ See COPYRIGHT and LICENSE files for more details. <%= error_messages_for :ldap_auth_source %> <% if @ldap_auth_source.new_record? %> -
- -
- <%= - link_translate( - "ldap_auth_sources.technical_warning", - links: { - docs_url: %i[sysadmin_docs ldap] - } - ) - %> -
-
+ <%= + render(Primer::Alpha::Banner.new(scheme: :warning, mb: 2, dismiss_scheme: :hide)) do + link_translate( + "ldap_auth_sources.technical_warning", + links: { + docs_url: %i[sysadmin_docs ldap] + } + ) + end + %> <% end %> <% if @ldap_auth_source.seeded_from_env? %> -
-
- <%= t(:label_seeded_from_env_warning) %> -
- <%= link_to t("ldap_auth_sources.back_to_index"), { action: :index } %> -
-
+ <%= render(Primer::Alpha::Banner.new(scheme: :warning, icon: :alert, mb: 2)) do %> + <%= t(:label_seeded_from_env_warning) %> +
+ <%= link_to t("ldap_auth_sources.back_to_index"), { action: :index } %> + <% end %> <% end %> <%= content_tag :fieldset, class: "form--fieldset", disabled: @ldap_auth_source.seeded_from_env? do %> diff --git a/app/views/members/_member_form.html.erb b/app/views/members/_member_form.html.erb index 5db509c6a23..7a37cfc3808 100644 --- a/app/views/members/_member_form.html.erb +++ b/app/views/members/_member_form.html.erb @@ -39,9 +39,19 @@ See COPYRIGHT and LICENSE files for more details. "user-limit-member-autocompleter-value": true } ) do |f| %> - " - class="hide-member-form-button form--close icon-context icon-close" - data-action="members-form#hideAddMemberForm"> + + <%= + render( + Primer::Beta::IconButton.new( + icon: :x, + scheme: :invisible, + classes: "hide-member-form-button form--close", + tooltip_direction: :se, + aria: { label: t("js.close_form_title") }, + data: { action: "members-form#hideAddMemberForm" } + ) + ) + %>
@@ -52,7 +62,7 @@ See COPYRIGHT and LICENSE files for more details. user_id_title = I18n.t(:label_principal_search) if current_user.admin? - user_id_title += I18n.t(:label_principal_invite_via_email) + user_id_title = "#{user_id_title}#{I18n.t(:label_principal_invite_via_email)}" end %> <%= styled_label_tag :member_user_ids, user_id_title %> @@ -61,7 +71,7 @@ See COPYRIGHT and LICENSE files for more details. inputs: { inputName: "member[user_ids]", inputBindValue: "id", - url: autocomplete_for_member_project_members_path + ".json", + url: "#{autocomplete_for_member_project_members_path}.json", multiple: true } %>
@@ -99,16 +109,23 @@ See COPYRIGHT and LICENSE files for more details.
<% if OpenProject::Enterprise.user_limit.present? %> -
-
-

<%= - link_translate( - "warning_user_limit_reached#{'_admin' if current_user.admin?}", - links: { upgrade_url: OpenProject::Enterprise.upgrade_url } - ) %> -

-
+ <%= + render( + Primer::Alpha::Banner.new( + scheme: :warning, + icon: :alert, + classes: "d-none", + data: { "user-limit-target": "limitWarning" } + ) + ) do + %> + <%= + link_translate( + "warning_user_limit_reached#{'_admin' if current_user.admin?}", + links: { upgrade_url: OpenProject::Enterprise.upgrade_url } + ) + %> <% end %> + <% end %> <% end %> diff --git a/app/views/onboarding/_configuration_modal.html.erb b/app/views/onboarding/_configuration_modal.html.erb index dccdee84e34..03858e60b0e 100644 --- a/app/views/onboarding/_configuration_modal.html.erb +++ b/app/views/onboarding/_configuration_modal.html.erb @@ -49,8 +49,7 @@ See COPYRIGHT and LICENSE files for more details. + dynamic-content-modal-close-button><%= t(:button_close) %> <%= styled_button_tag t(:button_save), class: "button_no-margin -primary -with-icon icon-checkmark spot-action-bar--action" %>
diff --git a/app/views/projects/settings/storage/_storage_field.html.erb b/app/views/projects/settings/storage/_storage_field.html.erb index 4dc837313a7..80d3c19eb0f 100644 --- a/app/views/projects/settings/storage/_storage_field.html.erb +++ b/app/views/projects/settings/storage/_storage_field.html.erb @@ -27,7 +27,7 @@ See COPYRIGHT and LICENSE files for more details. ++#%>
- + <%= number_to_human_size(value, precision: 2) %> diff --git a/app/views/repositories/_checkout_instructions.html.erb b/app/views/repositories/_checkout_instructions.html.erb index 5967c442e3b..7101b0dcb42 100644 --- a/app/views/repositories/_checkout_instructions.html.erb +++ b/app/views/repositories/_checkout_instructions.html.erb @@ -30,9 +30,10 @@ See COPYRIGHT and LICENSE files for more details. <% elsif @instructions.supported_but_not_enabled? %> -
- - -
-

<%= t("repositories.checkout.not_available") %>

-
-
+ <%= render(Primer::Alpha::Banner.new(scheme: :warning, icon: :alert, dismiss_scheme: :hide)) do %> + <%= t("repositories.checkout.not_available") %> + <% end %> <% end %> diff --git a/app/views/repositories/revision.html.erb b/app/views/repositories/revision.html.erb index 2c50f59912e..fcee2749cd3 100644 --- a/app/views/repositories/revision.html.erb +++ b/app/views/repositories/revision.html.erb @@ -27,9 +27,9 @@ See COPYRIGHT and LICENSE files for more details. ++#%> -<%= render(Repositories::Revision::PageHeaderComponent.new(changeset: @changeset, repository: @repository, project: @project)) %> +<%= render(Repositories::Revision::PageHeaderComponent.new(changeset: @changeset, repository: @repository, project: @project)) %> <%= form_tag({ controller: "/repositories", action: "revision", project_id: @project }, method: :get) do %> - <%= text_field_tag :rev, @rev, placeholder: t(:label_revision) %> + <%= text_field_tag :rev, @rev, placeholder: t(:label_revision), autocomplete: "off" %> <% end %>

<% if @changeset.scmid %>ID: <%= h(@changeset.scmid) %>
<% end %> @@ -46,11 +46,11 @@ See COPYRIGHT and LICENSE files for more details. <% if User.current.allowed_in_project?(:browse_repository, @project) %>

<%= t(:label_attachment_plural) %>

    -
  • ><%= t(:label_added) %>
  • -
  • ><%= t(:label_modified) %>
  • -
  • ><%= t(:label_copied) %>
  • -
  • ><%= t(:label_renamed) %>
  • -
  • ><%= t(:label_deleted) %>
  • +
  • <%= t(:label_added) %>
  • +
  • <%= t(:label_modified) %>
  • +
  • <%= t(:label_copied) %>
  • +
  • <%= t(:label_renamed) %>
  • +
  • <%= t(:label_deleted) %>

<%= link_to(t(:label_view_diff), action: "diff", project_id: @project, repo_path: nil, rev: @changeset.identifier) if @changeset.file_changes.any? %>

diff --git a/app/views/warning_bar/_unsupported_browser.html.erb b/app/views/warning_bar/_unsupported_browser.html.erb index 702c40ff945..c7aaf14fc8e 100644 --- a/app/views/warning_bar/_unsupported_browser.html.erb +++ b/app/views/warning_bar/_unsupported_browser.html.erb @@ -1,5 +1,7 @@
- " class="icon3 icon-warning warning-bar--disable-on-hover"> +

<%= t("unsupported_browser.title") %> @@ -27,8 +29,8 @@ } // Click handler to hide - var span = message.querySelector('.warning-bar--disable-on-hover'); - span.onclick = function() { + var closeButton = message.querySelector('.warning-bar--disable-on-hover'); + closeButton.onclick = function() { message.style.display = 'none'; try { window.localStorage.setItem('unsupported-browser-warning-ignore', '1'); diff --git a/frontend/src/global_styles/content/_links.sass b/frontend/src/global_styles/content/_links.sass index f2eed3075c6..0ee4f5565df 100644 --- a/frontend/src/global_styles/content/_links.sass +++ b/frontend/src/global_styles/content/_links.sass @@ -66,7 +66,7 @@ a.icon, a.icon-context a.icon:hover, a.icon-context:hover text-decoration: none -#content table th a.no-decoration-on-hover:hover, a.no-decoration-on-hover:hover +#content table th a.no-decoration-on-hover:hover, a.no-decoration-on-hover:hover, button.no-decoration-on-hover:hover text-decoration: none .skip-navigation-link diff --git a/modules/avatars/app/views/avatars/users/_gravatars.html.erb b/modules/avatars/app/views/avatars/users/_gravatars.html.erb index 9fb4fa4c4f8..b2da6da97db 100644 --- a/modules/avatars/app/views/avatars/users/_gravatars.html.erb +++ b/modules/avatars/app/views/avatars/users/_gravatars.html.erb @@ -1,5 +1,5 @@

- "><%= t "avatars.label_gravatar" %> + <%= t "avatars.label_gravatar" %>

<%= t "avatars.text_your_current_gravatar" %>

diff --git a/modules/avatars/app/views/avatars/users/_local_avatars.html.erb b/modules/avatars/app/views/avatars/users/_local_avatars.html.erb index c9cfbbeb0bd..07972e382a6 100644 --- a/modules/avatars/app/views/avatars/users/_local_avatars.html.erb +++ b/modules/avatars/app/views/avatars/users/_local_avatars.html.erb @@ -1,5 +1,5 @@
- "><%= t "avatars.label_local_avatar" %> + <%= t "avatars.label_local_avatar" %>

<%= t "avatars.text_your_local_avatar" %> <% if @manager.gravatar_enabled? %> diff --git a/modules/avatars/app/views/settings/_openproject_avatars.html.erb b/modules/avatars/app/views/settings/_openproject_avatars.html.erb index 041c742df65..c64a9ba4d8d 100644 --- a/modules/avatars/app/views/settings/_openproject_avatars.html.erb +++ b/modules/avatars/app/views/settings/_openproject_avatars.html.erb @@ -1,7 +1,7 @@ <% manager = ::OpenProject::Avatars::AvatarManager %>

- "><%= t "avatars.label_gravatar" %> + <%= t "avatars.label_gravatar" %>
<%= styled_label_tag "settings-enable-gravatars", t("avatars.settings.enable_gravatars") %> @@ -13,7 +13,7 @@
- "><%= t "avatars.label_local_avatar" %> + <%= t "avatars.label_local_avatar" %>
<%= styled_label_tag "settings-enable-local-avatars", t("avatars.settings.enable_local_avatars") %> <%= hidden_field_tag "settings[enable_local_avatars]", 0 %> diff --git a/modules/bim/app/views/bim/ifc_models/ifc_viewer/_unconverted_notice.html.erb b/modules/bim/app/views/bim/ifc_models/ifc_viewer/_unconverted_notice.html.erb index 784cd469f1b..6cda04088d1 100644 --- a/modules/bim/app/views/bim/ifc_models/ifc_viewer/_unconverted_notice.html.erb +++ b/modules/bim/app/views/bim/ifc_models/ifc_viewer/_unconverted_notice.html.erb @@ -1,11 +1,8 @@ -
- -
-

<%= t("ifc_models.processing_notice.processing_default") %>

-
    - <% unconverted.each do |model| %> -
  • <%= model.title %>
  • - <% end %> -
-
-
+<%= render(Primer::Alpha::Banner.new(scheme: :default, icon: :info, dismiss_scheme: :hide)) do %> +

<%= t("ifc_models.processing_notice.processing_default") %>

+
    + <% unconverted.each do |model| %> +
  • <%= model.title %>
  • + <% end %> +
+<% end %> diff --git a/modules/bim/spec/features/show_default_spec.rb b/modules/bim/spec/features/show_default_spec.rb index 4855e5c27e1..ca47d8cb428 100644 --- a/modules/bim/spec/features/show_default_spec.rb +++ b/modules/bim/spec/features/show_default_spec.rb @@ -98,9 +98,7 @@ RSpec.describe "show default model", :js, with_config: { edition: "bim" } do end it "renders a notification" do - show_default_page - .expect_toast(type: :info, - message: I18n.t(:"ifc_models.processing_notice.processing_default")) + expect(page).to have_css(".Banner", text: I18n.t(:"ifc_models.processing_notice.processing_default")) end end end diff --git a/modules/budgets/app/views/budgets/items/_labor_budget_item.html.erb b/modules/budgets/app/views/budgets/items/_labor_budget_item.html.erb index b04bbcdf028..0b92a9da571 100644 --- a/modules/budgets/app/views/budgets/items/_labor_budget_item.html.erb +++ b/modules/budgets/app/views/budgets/items/_labor_budget_item.html.erb @@ -93,11 +93,14 @@ See COPYRIGHT and LICENSE files for more details. <% end %> <% cost_value = labor_budget_item.amount || labor_budget_item.calculated_costs(@budget.fixed_date, @budget.project_id) %> - " class="costs--edit-planned-costs-btn icon-context icon-edit" title="<%= t(:help_click_to_edit) %>"> + <%= render partial: "/budgets/items/budget_override_cost_form", locals: { field_name: "#{name_prefix}[amount]", diff --git a/modules/budgets/app/views/budgets/items/_material_budget_item.html.erb b/modules/budgets/app/views/budgets/items/_material_budget_item.html.erb index e516d5a527e..1b0b662bf64 100644 --- a/modules/budgets/app/views/budgets/items/_material_budget_item.html.erb +++ b/modules/budgets/app/views/budgets/items/_material_budget_item.html.erb @@ -95,9 +95,12 @@ See COPYRIGHT and LICENSE files for more details. <% end %> <% cost_value = material_budget_item.amount || material_budget_item.calculated_costs(@budget.fixed_date) %> - + <%= render partial: "/budgets/items/budget_override_cost_form", locals: { field_name: "#{name_prefix}[amount]", diff --git a/modules/costs/app/views/admin/cost_types/_rate.html.erb b/modules/costs/app/views/admin/cost_types/_rate.html.erb index 42d295dbfa0..74392dc6456 100644 --- a/modules/costs/app/views/admin/cost_types/_rate.html.erb +++ b/modules/costs/app/views/admin/cost_types/_rate.html.erb @@ -76,11 +76,18 @@ See COPYRIGHT and LICENSE files for more details. - - <%= op_icon("icon-context icon-delete", title: t(:button_delete)) %> - + <%= + render( + Primer::Beta::IconButton.new( + icon: :trash, + scheme: :invisible, + type: :button, + classes: "delete-row-button", + aria: { label: t(:button_delete) }, + data: { action: "subform#deleteRow" } + ) + ) + %> <% end %> <% end %> diff --git a/modules/costs/app/views/admin/cost_types/edit.html.erb b/modules/costs/app/views/admin/cost_types/edit.html.erb index ac369f62701..7675ce934bb 100644 --- a/modules/costs/app/views/admin/cost_types/edit.html.erb +++ b/modules/costs/app/views/admin/cost_types/edit.html.erb @@ -122,13 +122,19 @@ See COPYRIGHT and LICENSE files for more details.
- - <%= op_icon("icon icon-add") %> - + <%= + render( + Primer::Beta::IconButton.new( + icon: :plus, + id: "add_rate_date", + scheme: :invisible, + type: :button, + classes: "add-row-button wp-inline-create--add-link", + aria: { label: t(:button_add_rate) }, + data: { action: "subform#addRow" } + ) + ) + %>
<%= styled_button_tag t(:button_save), class: "-with-icon icon-checkmark" %> <% end %> diff --git a/modules/costs/app/views/costlog/edit.html.erb b/modules/costs/app/views/costlog/edit.html.erb index 271762a91a6..b5207f09203 100644 --- a/modules/costs/app/views/costlog/edit.html.erb +++ b/modules/costs/app/views/costlog/edit.html.erb @@ -130,13 +130,12 @@ See COPYRIGHT and LICENSE files for more details. <% if User.current.allowed_in_project?(:view_cost_rates, @cost_entry.project) %> - - <%= number_to_currency(@cost_entry.real_costs) %> - + <%= render partial: "/budgets/items/budget_override_cost_form", locals: { field_name: "cost_entry[overridden_costs]", diff --git a/modules/costs/app/views/hourly_rates/_rate.html.erb b/modules/costs/app/views/hourly_rates/_rate.html.erb index 01d4906876e..bd9dcf66671 100644 --- a/modules/costs/app/views/hourly_rates/_rate.html.erb +++ b/modules/costs/app/views/hourly_rates/_rate.html.erb @@ -67,9 +67,18 @@ See COPYRIGHT and LICENSE files for more details. - - <%= op_icon("icon-context icon-delete", title: t(:button_delete)) %> - + <%= + render( + Primer::Beta::IconButton.new( + icon: :trash, + scheme: :invisible, + type: :button, + classes: "delete-row-button", + aria: { label: t(:button_delete) }, + data: { action: "subform#deleteRow" } + ) + ) + %> <% end %> <% end %> diff --git a/modules/costs/app/views/hourly_rates/edit.html.erb b/modules/costs/app/views/hourly_rates/edit.html.erb index 2c230e9fd15..fb8f1e45808 100644 --- a/modules/costs/app/views/hourly_rates/edit.html.erb +++ b/modules/costs/app/views/hourly_rates/edit.html.erb @@ -105,10 +105,19 @@ See COPYRIGHT and LICENSE files for more details.
- - <%= op_icon("icon icon-add") %> - <%= t(:button_add_rate) %> - + <%= + render( + Primer::Beta::Button.new( + scheme: :link, + type: :button, + classes: "add-row-button wp-inline-create--add-link", + data: { action: "subform#addRow" } + ) + ) do |button| + button.with_leading_visual_icon(icon: :plus) + t(:button_add_rate) + end + %>
<%= styled_button_tag t(:button_save), class: "-with-icon icon-checkmark" %> diff --git a/modules/costs/spec/features/users_hourly_rates_spec.rb b/modules/costs/spec/features/users_hourly_rates_spec.rb index ae175607e5e..e3c1b185055 100644 --- a/modules/costs/spec/features/users_hourly_rates_spec.rb +++ b/modules/costs/spec/features/users_hourly_rates_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + #-- copyright # OpenProject is an open source project management software. # Copyright (C) the OpenProject GmbH @@ -64,7 +66,7 @@ RSpec.describe "hourly rates on user edit", :js do before do click_link "Update" # go to update view for rates SeleniumHubWaiter.wait - find(".icon-delete").click # delete last existing rate + find(".delete-row-button").click # delete last existing rate click_on "Save" # save change end @@ -88,13 +90,14 @@ RSpec.describe "hourly rates on user edit", :js do # Expect the german locale output expect(page).to have_field("user[existing_rate_attributes][#{rate.id}][rate]", with: "1,00") - click_link "Satz hinzufügen" + click_button "Satz hinzufügen" fill_in "user_new_rate_attributes_1_valid_from", with: (Time.zone.today + 1.day).iso8601 find("input#user_new_rate_attributes_1_valid_from").send_keys :escape fill_in "user_new_rate_attributes_1_rate", with: "5,12" click_button "Speichern" + expect_flash(type: :notice) view_rates diff --git a/modules/documents/app/views/help/wiki_syntax_detailed.html.erb b/modules/documents/app/views/help/wiki_syntax_detailed.html.erb index 9fce590c933..68c7df4e5f9 100644 --- a/modules/documents/app/views/help/wiki_syntax_detailed.html.erb +++ b/modules/documents/app/views/help/wiki_syntax_detailed.html.erb @@ -67,21 +67,21 @@ See COPYRIGHT and LICENSE files for more details.

OpenProject allows hyperlinking between issues, changesets and wiki pages from anywhere wiki formatting is used.

    -
  • #124 displays a link to an issue: #124 (link is striked-through if the issue is closed)
  • -
  • ##124 displays a link to an issue with context information: #12 New: Issue subject 2012-05-14 - 2012-05-23 (User Name - assigned to)
  • +
  • #124 displays a link to an issue: #124 (link is striked-through if the issue is closed)
  • +
  • ##124 displays a link to an issue with context information: #12 New: Issue subject 2012-05-14 - 2012-05-23 (User Name - assigned to)
  • ###124 displays a link to an issue with context information and an excerpt (first 3 lines) of the description
  • -
  • r758 displays a link to a changeset: r758
  • -
  • commit:c6f4d0fd displays a link to a changeset with a non-numeric hash: c6f4d0fd
  • -
  • sandbox:r758 displays a link to a changeset of another project: sandbox:r758
  • -
  • sandbox:c6f4d0fd displays a link to a changeset with a non-numeric hash: sandbox:c6f4d0fd
  • +
  • r758 displays a link to a changeset: r758
  • +
  • commit:c6f4d0fd displays a link to a changeset with a non-numeric hash: c6f4d0fd
  • +
  • sandbox:r758 displays a link to a changeset of another project: sandbox:r758
  • +
  • sandbox:c6f4d0fd displays a link to a changeset with a non-numeric hash: sandbox:c6f4d0fd

Wiki links:

    -
  • [[Guide]] displays a link to the page named 'Guide': Guide
  • -
  • [[Guide#further-reading]] takes you to the anchor "further-reading". Headings get automatically assigned anchors so that you can refer to them: Guide
  • -
  • [[Guide|User manual]] displays a link to the same page but with a different text: User manual
  • +
  • [[Guide]] displays a link to the page named 'Guide': Guide
  • +
  • [[Guide#further-reading]] takes you to the anchor "further-reading". Headings get automatically assigned anchors so that you can refer to them: Guide
  • +
  • [[Guide|User manual]] displays a link to the same page but with a different text: User manual

You can also link to pages of an other project wiki:

@@ -91,7 +91,7 @@ See COPYRIGHT and LICENSE files for more details.
  • [[sandbox:]] displays a link to the Sandbox wiki main page
  • -

    Wiki links are displayed in red if the page doesn't exist yet, eg: Nonexistent page.

    +

    Wiki links are displayed in red if the page doesn't exist yet, eg: Nonexistent page.

    Links to other resources:

    diff --git a/modules/two_factor_authentication/app/views/two_factor_authentication/authentication/enter_backup_code.html.erb b/modules/two_factor_authentication/app/views/two_factor_authentication/authentication/enter_backup_code.html.erb index 469acc20eaf..198d258d0d4 100644 --- a/modules/two_factor_authentication/app/views/two_factor_authentication/authentication/enter_backup_code.html.erb +++ b/modules/two_factor_authentication/app/views/two_factor_authentication/authentication/enter_backup_code.html.erb @@ -6,18 +6,19 @@ id: "submit_backup_code", data: { turbo: false - }) do %> + } + ) do %>

    <%= t "two_factor_authentication.login.enter_backup_code_title" %>

    <%= I18n.t("two_factor_authentication.login.enter_backup_code_text") %>


    <%= styled_label_tag "backup_code", t("two_factor_authentication.backup_codes.singular") %>
    - <%= styled_text_field_tag "backup_code", nil, required: true, autocomplete: "off", size: 20, maxlength: 20, tabindex: 1, autofocus: true %> + <%= styled_text_field_tag "backup_code", nil, required: true, autocomplete: "off", size: 20, maxlength: 20, autofocus: true %>
    <% end %>
    diff --git a/modules/two_factor_authentication/app/views/two_factor_authentication/authentication/request_otp.html.erb b/modules/two_factor_authentication/app/views/two_factor_authentication/authentication/request_otp.html.erb index d1ab0c2db62..9fa31188313 100644 --- a/modules/two_factor_authentication/app/views/two_factor_authentication/authentication/request_otp.html.erb +++ b/modules/two_factor_authentication/app/views/two_factor_authentication/authentication/request_otp.html.erb @@ -1,5 +1,5 @@ <% resend_supported = @strategy.mobile_token? %> -<% has_other_devices = @active_devices.count > 1 %> +<% has_other_devices = @active_devices.many? %> <% has_backup_codes = @authenticated_user.otp_backup_codes.exists? %> <% html_title t(:field_otp) %>
    <%= styled_label_tag "otp", t(:field_otp) %>
    - <%= styled_text_field_tag "otp", nil, autocomplete: "off", size: 6, maxlength: 6, tabindex: 1, autofocus: true %> + <%= styled_text_field_tag "otp", nil, autocomplete: "off", size: 6, maxlength: 6, autofocus: true %>
    <% else %> @@ -45,7 +45,7 @@
    <% end %>