From 2cf5fce5625aec962a48d3147bff21f4b127ba57 Mon Sep 17 00:00:00 2001 From: djmaze Date: Fri, 19 Mar 2021 10:11:30 +0100 Subject: [PATCH] Resolve Issue #61 --- plugins/change-password/index.php | 4 ++-- .../js/ChangePasswordUserSettings.js | 22 ++++++++----------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/plugins/change-password/index.php b/plugins/change-password/index.php index e4976168e..eebd684a1 100644 --- a/plugins/change-password/index.php +++ b/plugins/change-password/index.php @@ -6,8 +6,8 @@ class ChangePasswordPlugin extends \RainLoop\Plugins\AbstractPlugin { const NAME = 'Change Password', - VERSION = '2.0', - RELEASE = '2021-03-15', + VERSION = '2.1', + RELEASE = '2021-03-18', REQUIRED = '2.4.0', CATEGORY = 'Security', DESCRIPTION = 'This plugin allows you to change passwords of email accounts'; diff --git a/plugins/change-password/js/ChangePasswordUserSettings.js b/plugins/change-password/js/ChangePasswordUserSettings.js index 8592b6b9e..738bd2741 100644 --- a/plugins/change-password/js/ChangePasswordUserSettings.js +++ b/plugins/change-password/js/ChangePasswordUserSettings.js @@ -34,19 +34,15 @@ class ChangePasswordUserSettings { constructor() { - ko.addObservablesTo(this, { - changeProcess: false, - - errorDescription: '', - passwordMismatch: false, - passwordUpdateError: false, - passwordUpdateSuccess: false, - - currentPassword: '', - currentPasswordError: false, - newPassword: '', - newPassword2: '', - }); + this.changeProcess = ko.observable(false); + this.errorDescription = ko.observable(''); + this.passwordMismatch = ko.observable(false); + this.passwordUpdateError = ko.observable(false); + this.passwordUpdateSuccess = ko.observable(false); + this.currentPassword = ko.observable(''); + this.currentPasswordError = ko.observable(false); + this.newPassword = ko.observable(''); + this.newPassword2 = ko.observable(''); this.currentPassword.subscribe(() => this.resetUpdate(true)); this.newPassword.subscribe(() => this.resetUpdate());