Skip to content

Commit

Permalink
AO3-6377 Change edit profile page title (#4706)
Browse files Browse the repository at this point in the history
* Updated browser title for the Edit Profile page.

* added url to title

* putting passwords back to normal

* address PR feedback

* change en.yml
  • Loading branch information
smclairecarden authored Feb 17, 2024
1 parent e7b2708 commit c09729d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions config/locales/views/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions features/other_a/profile_edit.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c09729d

Please sign in to comment.