From 3ca974e101dd789c1e5540f4d1c5b197ab92083d Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 26 Oct 2023 06:52:14 -0400 Subject: [PATCH] Use `next` keyword in field loop in admin/accounts/index view (#27559) --- .haml-lint_todo.yml | 1 - app/views/admin/accounts/index.html.haml | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.haml-lint_todo.yml b/.haml-lint_todo.yml index 7684ab63f..ff66764e0 100644 --- a/.haml-lint_todo.yml +++ b/.haml-lint_todo.yml @@ -16,6 +16,5 @@ linters: exclude: - 'app/views/admin/accounts/_buttons.html.haml' - 'app/views/admin/accounts/_local_account.html.haml' - - 'app/views/admin/accounts/index.html.haml' - 'app/views/admin/roles/_form.html.haml' - 'app/views/layouts/application.html.haml' diff --git a/app/views/admin/accounts/index.html.haml b/app/views/admin/accounts/index.html.haml index da11e4361..9cec8d632 100644 --- a/app/views/admin/accounts/index.html.haml +++ b/app/views/admin/accounts/index.html.haml @@ -22,9 +22,10 @@ .fields-group - %i(username by_domain display_name email ip).each do |key| - - unless key == :by_domain && params[:origin] != 'remote' - .input.string.optional - = text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.accounts.#{key}") + - next if key == :by_domain && params[:origin] != 'remote' + + .input.string.optional + = text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.accounts.#{key}") .actions %button.button= t('admin.accounts.search')