From accf7c354f1895c99659796826a867371b20412c Mon Sep 17 00:00:00 2001 From: tischsoic Date: Fri, 5 Jan 2024 09:53:53 +0100 Subject: [PATCH] Password change in user settings --- features/personas/ChangePassword.feature | 2 +- src/bundle/Resources/translations/ibexa_menu.en.xliff | 8 ++++---- src/bundle/Resources/translations/messages.en.xliff | 10 +++++----- .../UserPasswordChangeRightSidebarListener.php | 4 ++-- src/lib/Menu/UserPasswordChangeRightSidebarBuilder.php | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/features/personas/ChangePassword.feature b/features/personas/ChangePassword.feature index 5d55b957d5..be9d89a1a0 100644 --- a/features/personas/ChangePassword.feature +++ b/features/personas/ChangePassword.feature @@ -8,7 +8,7 @@ Feature: Verify that an User allowed to change password can change his password And I switch to "Account settings" tab in User settings And I click on the change password button And I change password from "Passw0rd-42" to "Passw0rd-43" - And I perform the "Update" action + And I perform the "Save and close" action Then success notification that "Your password has been successfully changed." appears And I should be on "User settings" page diff --git a/src/bundle/Resources/translations/ibexa_menu.en.xliff b/src/bundle/Resources/translations/ibexa_menu.en.xliff index db76437a17..0cd88856a3 100644 --- a/src/bundle/Resources/translations/ibexa_menu.en.xliff +++ b/src/bundle/Resources/translations/ibexa_menu.en.xliff @@ -567,13 +567,13 @@ key: user_edit__sidebar_right__update - Discard changes - Discard changes + Discard + Discard key: user_password_change__sidebar_right__cancel - Update - Update + Save and close + Save and close key: user_password_change__sidebar_right__update diff --git a/src/bundle/Resources/translations/messages.en.xliff b/src/bundle/Resources/translations/messages.en.xliff index 1490315158..ae65c77920 100644 --- a/src/bundle/Resources/translations/messages.en.xliff +++ b/src/bundle/Resources/translations/messages.en.xliff @@ -503,16 +503,16 @@ Change password key: my_account_settings.password.action.edit + + You don't have permissions to change the password. Contact your administrator. + You don't have permissions to change the password. Contact your administrator. + key: my_account_settings.password.message + Password Password key: my_account_settings.password.title - - You don't have permissions to change the password. Contact your administrator. - You don't have permissions to change the password. Contact your administrator. - key: user.password.message - The Content item is no longer available The Content item is no longer available diff --git a/src/lib/EventListener/UserPasswordChangeRightSidebarListener.php b/src/lib/EventListener/UserPasswordChangeRightSidebarListener.php index a6c287ce3d..13de8901ee 100644 --- a/src/lib/EventListener/UserPasswordChangeRightSidebarListener.php +++ b/src/lib/EventListener/UserPasswordChangeRightSidebarListener.php @@ -68,8 +68,8 @@ public function onUserPasswordChangeRightSidebarConfigure(ConfigureMenuEvent $ev public static function getTranslationMessages(): array { return [ - (new Message(self::ITEM__UPDATE, 'ibexa_menu'))->setDesc('Update'), - (new Message(self::ITEM__CANCEL, 'ibexa_menu'))->setDesc('Discard changes'), + (new Message(self::ITEM__UPDATE, 'ibexa_menu'))->setDesc('Save and close'), + (new Message(self::ITEM__CANCEL, 'ibexa_menu'))->setDesc('Discard'), ]; } } diff --git a/src/lib/Menu/UserPasswordChangeRightSidebarBuilder.php b/src/lib/Menu/UserPasswordChangeRightSidebarBuilder.php index 97a837b45e..2cef1b61e0 100644 --- a/src/lib/Menu/UserPasswordChangeRightSidebarBuilder.php +++ b/src/lib/Menu/UserPasswordChangeRightSidebarBuilder.php @@ -90,8 +90,8 @@ public function createStructure(array $options): ItemInterface public static function getTranslationMessages(): array { return [ - (new Message(self::ITEM__UPDATE, 'ibexa_menu'))->setDesc('Update'), - (new Message(self::ITEM__CANCEL, 'ibexa_menu'))->setDesc('Discard changes'), + (new Message(self::ITEM__UPDATE, 'ibexa_menu'))->setDesc('Save and close'), + (new Message(self::ITEM__CANCEL, 'ibexa_menu'))->setDesc('Discard'), ]; } }