From 2c37865265e0360b5db8e11df6b4787d1b050014 Mon Sep 17 00:00:00 2001 From: K4r0n1 Date: Mon, 13 May 2024 23:38:04 +0200 Subject: [PATCH 1/2] Moved table in profile/edit and updated grid. --- app/assets/stylesheets/application.css | 6 ++++++ app/views/users/registrations/edit.html.erb | 15 ++++++++------- config/locales/en.yml | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 4c49e38..476ea95 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -202,6 +202,12 @@ input[type=text]:read-only { fill: #009ade; } +.left{ + margin-right: auto; +} +.right{ + margin-left: auto; +} .leftside { grid-area: leftside; diff --git a/app/views/users/registrations/edit.html.erb b/app/views/users/registrations/edit.html.erb index d927d21..5f78ed1 100644 --- a/app/views/users/registrations/edit.html.erb +++ b/app/views/users/registrations/edit.html.erb @@ -8,11 +8,11 @@ method: :delete, onclick: {confirm: t(".confirm_delete")} %> <% end %> - -<%= labelled_form_for resource, url: registration_path(resource), html: {method: :patch} do |f| %> +
+ <%= labelled_form_for resource, url: registration_path(resource), html: {method: :patch} do |f| %> <%= f.email_field :email, size: 30, autofocus: true, autocomplete: "off" %> <% if f.object.pending_reconfirmation? %> - <%= f.text_field :unconfirmed_email, readonly: true, tabindex: -1, + <%= f.text_field :unconfirmed_email, readonly: true, tabindex: -1, hint: t(".unconfirmed_email_hint", timestamp: f.object.confirmation_sent_at.to_fs(:db_without_sec)) %> <% end %> @@ -20,11 +20,12 @@ <%= f.select :status, User.statuses, readonly: true %> <%= f.password_field :password, label: t(".new_password"), size: 30, - minlength: @minimum_password_length, autocomplete: "new-password", - hint: t(".blank_password_hint", - subhint: t("users.minimum_password_length", count: @minimum_password_length)) %> + minlength: @minimum_password_length, autocomplete: "new-password", + hint: t(".blank_password_hint").html_safe + ("
").html_safe + + t("users.minimum_password_length", count: @minimum_password_length) %> <%= f.password_field :password_confirmation, label: t(".password_confirmation"), - size: 30, minlength: @minimum_password_length, autocomplete: "off" %> + size: 30, minlength: @minimum_password_length, autocomplete: "off" %> <%= f.submit t(".update") %> +
<% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 68b1520..779a682 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -85,7 +85,7 @@ en: unconfirmed_email_hint: (since %{timestamp}) new_password: New password password_confirmation: Retype new password - blank_password_hint: leave blank to keep unchanged
%{subhint} + blank_password_hint: leave blank to keep unchanged update: Update profile sessions: new: -- 2.49.1 From c049fc8d2482b5bf47813cc7feae4339aefa20e5 Mon Sep 17 00:00:00 2001 From: K4r0n1 Date: Mon, 13 May 2024 23:38:04 +0200 Subject: [PATCH 2/2] Moved table in profile/edit and updated grid. --- app/assets/stylesheets/application.css | 10 +++------- app/views/users/registrations/edit.html.erb | 12 ++++++------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 476ea95..05b6b04 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -202,13 +202,6 @@ input[type=text]:read-only { fill: #009ade; } -.left{ - margin-right: auto; -} -.right{ - margin-left: auto; -} - .leftside { grid-area: leftside; } @@ -466,6 +459,9 @@ table.items select:focus-visible { .extendedright { margin-right: auto; } +.extendedleft { + margin-left: auto; +} [disabled] { border-color: var(--color-border-gray) !important; color: var(--color-border-gray) !important; diff --git a/app/views/users/registrations/edit.html.erb b/app/views/users/registrations/edit.html.erb index 5f78ed1..3e27e67 100644 --- a/app/views/users/registrations/edit.html.erb +++ b/app/views/users/registrations/edit.html.erb @@ -1,13 +1,13 @@ +
<% content_for :navigation, flush: true do %> -
<%= image_link_to t(:back), 'arrow-left-bold-outline', request.referer.present? ? :back : root_url %> -
-
- <%= image_button_to t(".delete"), "account-remove-outline", user_registration_path, - method: :delete, onclick: {confirm: t(".confirm_delete")} %> -
<% end %> +
+
+ <%= image_button_to t(".delete"), "account-remove-outline", user_registration_path, + method: :delete, :class => "extendedleft", onclick: {confirm: t(".confirm_delete")} %> +
<%= labelled_form_for resource, url: registration_path(resource), html: {method: :patch} do |f| %> <%= f.email_field :email, size: 30, autofocus: true, autocomplete: "off" %> -- 2.49.1