From c09729dbe28774f8c99856ad81665481c17db044 Mon Sep 17 00:00:00 2001 From: Claire Carden <96350691+smclairecarden@users.noreply.github.com> Date: Sat, 17 Feb 2024 16:05:53 -0600 Subject: [PATCH] AO3-6377 Change edit profile page title (#4706) * Updated browser title for the Edit Profile page. * added url to title * putting passwords back to normal * address PR feedback * change en.yml --- app/controllers/users_controller.rb | 2 +- config/locales/views/en.yml | 2 ++ features/other_a/profile_edit.feature | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index c741f88159c..b4429d20adf 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -35,6 +35,7 @@ def show # GET /users/1/edit def edit + @page_subtitle = t(".browser_title") authorize @user.profile if logged_in_as_admin? end @@ -127,7 +128,6 @@ def activate def update authorize @user.profile if logged_in_as_admin? - if @user.profile.update(profile_params) if logged_in_as_admin? && @user.profile.ticket_url.present? link = view_context.link_to("Ticket ##{@user.profile.ticket_number}", @user.profile.ticket_url) diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index 985f9b31d63..358bdcc0323 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -733,6 +733,8 @@ en: options_info: You can delete them, but please consider %{orphaning_link} them instead! works_summary: 'You have %{work_count} work(s) under the following pseuds: %{pseuds}.' submit: Save + edit: + browser_title: Edit Profile registrations: new: cancel: Cancel diff --git a/features/other_a/profile_edit.feature b/features/other_a/profile_edit.feature index d383bcf2941..62c61c8ba51 100644 --- a/features/other_a/profile_edit.feature +++ b/features/other_a/profile_edit.feature @@ -13,6 +13,7 @@ Background: Scenario: Add details + Then I should see the page title "Edit Profile" When I fill in the details of my profile Then I should see "Your profile has been successfully updated" And 0 emails should be delivered