From b3588b1865595554e72595b971d7b866306b0e78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 24 Mar 2024 16:50:24 +0100 Subject: [PATCH] Remove no-margin-bottom HTML class It was only used once, and we can use a selector that makes it obvious where it is used. Besides, the style for the no-margin-bottom class was to remove the bottom margin, which was inconsistent with the style for the no-margin-top class, which adds a negative margin to the element. I'm not sure why we're removing the margin here, though, since it isn't consistent with the rest of the forms in the application. For now, we're keeping it the way it used to look. --- .../management/account/edit_password_manually.scss | 6 ++++-- .../account/edit_password_manually_component.html.erb | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/management/account/edit_password_manually.scss b/app/assets/stylesheets/management/account/edit_password_manually.scss index c16816657..581fd2579 100644 --- a/app/assets/stylesheets/management/account/edit_password_manually.scss +++ b/app/assets/stylesheets/management/account/edit_password_manually.scss @@ -1,3 +1,5 @@ -.no-margin-bottom { - margin-bottom: 0 !important; +.management-account-edit-password-manually { + [type=password] { + margin-bottom: 0 !important; + } } diff --git a/app/components/management/account/edit_password_manually_component.html.erb b/app/components/management/account/edit_password_manually_component.html.erb index d095757e1..484974695 100644 --- a/app/components/management/account/edit_password_manually_component.html.erb +++ b/app/components/management/account/edit_password_manually_component.html.erb @@ -1,3 +1,5 @@ +<% provide :main_class, "management-account-edit-password-manually" %> +

<%= t("management.account.menu.reset_password_manually") %>

<%= form_for user, url: change_password_management_account_path do |f| %> @@ -6,7 +8,7 @@
- <%= f.password_field :password, class: "input-group-field no-margin-bottom", label: false, value: nil %> + <%= f.password_field :password, class: "input-group-field", label: false, value: nil %>