From 480bcdcf35de768db279a495b7686792f3d3e501 Mon Sep 17 00:00:00 2001 From: Mazen Abdo Date: Sun, 9 Nov 2025 14:40:26 +0200 Subject: [PATCH 1/2] Show Reset Password button for users on the login page --- .../mpl_login_background/controllers/main.py | 1 + .../templates/left_login_template.xml | 3 +++ .../templates/middle_login_template.xml | 3 +++ .../templates/right_login_template.xml | 3 +++ .../wizard/base_module_uninstall.py | 14 +++++++------- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/odex25_base/mpl_login_background/controllers/main.py b/odex25_base/mpl_login_background/controllers/main.py index eda1f4021..a6c1f745e 100644 --- a/odex25_base/mpl_login_background/controllers/main.py +++ b/odex25_base/mpl_login_background/controllers/main.py @@ -98,6 +98,7 @@ class Home(http.Controller): background = param_obj.get_param('mpl_login_background.background') values['background_color'] = param_obj.get_param('mpl_login_background.color') b_image = param_obj.get_param('mpl_login_background.b_image') + values['reset_password_enabled'] = param_obj.get_param('auth_signup.reset_password') == 'True' if background == 'image': image_url = '' diff --git a/odex25_base/mpl_login_background/templates/left_login_template.xml b/odex25_base/mpl_login_background/templates/left_login_template.xml index 1670510fa..1a6dd59f1 100644 --- a/odex25_base/mpl_login_background/templates/left_login_template.xml +++ b/odex25_base/mpl_login_background/templates/left_login_template.xml @@ -60,6 +60,9 @@
+ + Reset Password + diff --git a/odex25_base/mpl_login_background/templates/middle_login_template.xml b/odex25_base/mpl_login_background/templates/middle_login_template.xml index 5e161703d..9ebac607d 100644 --- a/odex25_base/mpl_login_background/templates/middle_login_template.xml +++ b/odex25_base/mpl_login_background/templates/middle_login_template.xml @@ -64,6 +64,9 @@
+ + Reset Password + diff --git a/odex25_base/mpl_login_background/templates/right_login_template.xml b/odex25_base/mpl_login_background/templates/right_login_template.xml index 9a8006c50..fa4cc8c04 100644 --- a/odex25_base/mpl_login_background/templates/right_login_template.xml +++ b/odex25_base/mpl_login_background/templates/right_login_template.xml @@ -60,6 +60,9 @@
+ + Reset Password + diff --git a/odex25_base/odex25_apps_features/wizard/base_module_uninstall.py b/odex25_base/odex25_apps_features/wizard/base_module_uninstall.py index 8e96435c8..5ded8e799 100644 --- a/odex25_base/odex25_apps_features/wizard/base_module_uninstall.py +++ b/odex25_base/odex25_apps_features/wizard/base_module_uninstall.py @@ -10,10 +10,10 @@ class BaseModuleUninstall(models.TransientModel): is_restrict = fields.Boolean() password = fields.Char(required=True) - - def action_uninstall(self): - if not tools.config.get('uninstall_password'): - raise ValidationError("Uninstall password not yet set!") - if self.password != tools.config.get('uninstall_password').replace('\'', ''): - raise ValidationError("Invalid Password!") - return super(BaseModuleUninstall, self).action_uninstall() + # + # def action_uninstall(self): + # if not tools.config.get('uninstall_password'): + # raise ValidationError("Uninstall password not yet set!") + # if self.password != tools.config.get('uninstall_password').replace('\'', ''): + # raise ValidationError("Invalid Password!") + # return super(BaseModuleUninstall, self).action_uninstall() From 4a88f8e0277fcd9eb9f214fd8fb6960447c9bf89 Mon Sep 17 00:00:00 2001 From: Mazen Abdo Date: Sun, 9 Nov 2025 14:42:00 +0200 Subject: [PATCH 2/2] Show Reset Password button for users on the login page --- .../wizard/base_module_uninstall.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/odex25_base/odex25_apps_features/wizard/base_module_uninstall.py b/odex25_base/odex25_apps_features/wizard/base_module_uninstall.py index 5ded8e799..8e96435c8 100644 --- a/odex25_base/odex25_apps_features/wizard/base_module_uninstall.py +++ b/odex25_base/odex25_apps_features/wizard/base_module_uninstall.py @@ -10,10 +10,10 @@ class BaseModuleUninstall(models.TransientModel): is_restrict = fields.Boolean() password = fields.Char(required=True) - # - # def action_uninstall(self): - # if not tools.config.get('uninstall_password'): - # raise ValidationError("Uninstall password not yet set!") - # if self.password != tools.config.get('uninstall_password').replace('\'', ''): - # raise ValidationError("Invalid Password!") - # return super(BaseModuleUninstall, self).action_uninstall() + + def action_uninstall(self): + if not tools.config.get('uninstall_password'): + raise ValidationError("Uninstall password not yet set!") + if self.password != tools.config.get('uninstall_password').replace('\'', ''): + raise ValidationError("Invalid Password!") + return super(BaseModuleUninstall, self).action_uninstall()