From dd227e4bb1fb1e6a81f66f752f4c2cfa6a9dfb25 Mon Sep 17 00:00:00 2001 From: ogerly Date: Tue, 15 Jun 2021 11:47:07 +0200 Subject: [PATCH 1/4] change userdata button disable rules --- .../Pages/UserProfile/UserCard_FormUserData.vue | 2 +- .../UserProfile/UserCard_FormUserPasswort.vue | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/Pages/UserProfile/UserCard_FormUserData.vue b/frontend/src/views/Pages/UserProfile/UserCard_FormUserData.vue index 1fa26b5e0..254c0cb9e 100644 --- a/frontend/src/views/Pages/UserProfile/UserCard_FormUserData.vue +++ b/frontend/src/views/Pages/UserProfile/UserCard_FormUserData.vue @@ -68,7 +68,7 @@
+
- + {{ $t('form.save') }}
@@ -132,7 +139,12 @@ export default { this.passwordVisibleOldPwd = !this.passwordVisibleOldPwd }, loadSubmitButton() { - if (this.passwordVisibleNewPwd === this.passwordVisibleNewPwdRepeat) { + if ( + this.password !== '' && + this.passwordNew !== '' && + this.passwordNewRepeat !== '' && + this.passwordNew === this.passwordNewRepeat + ) { this.loading = false } else { this.loading = true From 37ffb1fc594cb6b81ab81b8d738b5220313a54f4 Mon Sep 17 00:00:00 2001 From: ogerly Date: Tue, 15 Jun 2021 12:21:18 +0200 Subject: [PATCH 2/4] rules for change new passwort fix --- .../UserProfile/UserCard_FormUserPasswort.vue | 48 ++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.vue b/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.vue index aba9809fe..34fd39e68 100644 --- a/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.vue +++ b/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.vue @@ -20,7 +20,7 @@
- + {{ $t('form.password_old') }} @@ -43,6 +43,7 @@ + {{ $t('form.password_new') }} @@ -89,6 +90,26 @@ + + + + +
+
    +
  • + {{ error }} +
  • +
+
+
+

+ {{ $t('site.signup.dont_match') }} + +

+
+
+
+
@@ -165,6 +186,31 @@ export default { } }, }, + computed: { + samePasswords() { + return this.password === this.passwordNew + }, + rules() { + return [ + { message: this.$t('site.signup.lowercase'), regex: /[a-z]+/ }, + { message: this.$t('site.signup.uppercase'), regex: /[A-Z]+/ }, + { message: this.$t('site.signup.minimum'), regex: /.{8,}/ }, + { message: this.$t('site.signup.one_number'), regex: /[0-9]+/ }, + ] + }, + passwordValidation() { + const errors = [] + for (const condition of this.rules) { + if (!condition.regex.test(this.passwordNew)) { + errors.push(condition.message) + } + } + if (errors.length === 0) { + return { valid: true, errors } + } + return { valid: false, errors } + }, + }, } From 280aa8e1f13860c1648f31471bff86067ac301fb Mon Sep 17 00:00:00 2001 From: ogerly Date: Tue, 15 Jun 2021 12:39:47 +0200 Subject: [PATCH 3/4] rules fix --- .../Pages/UserProfile/UserCard_FormUserPasswort.vue | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.vue b/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.vue index 34fd39e68..4a8979d2c 100644 --- a/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.vue +++ b/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.vue @@ -94,19 +94,13 @@ -
+
  • {{ error }}
-
-

- {{ $t('site.signup.dont_match') }} - -

-
@@ -147,6 +141,7 @@ export default { passwordVisibleNewPwd: false, passwordVisibleNewPwdRepeat: false, loading: true, + } }, methods: { From 4aa25724b0c3e33fb22d40f4aefcae41e798f841 Mon Sep 17 00:00:00 2001 From: ogerly Date: Tue, 15 Jun 2021 12:43:13 +0200 Subject: [PATCH 4/4] fix sidebar xxx --- frontend/src/components/SidebarPlugin/SideBar.vue | 2 +- .../src/views/Pages/UserProfile/UserCard_FormUserPasswort.vue | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/components/SidebarPlugin/SideBar.vue b/frontend/src/components/SidebarPlugin/SideBar.vue index 756e72d2a..495dec3d2 100755 --- a/frontend/src/components/SidebarPlugin/SideBar.vue +++ b/frontend/src/components/SidebarPlugin/SideBar.vue @@ -85,7 +85,7 @@ export default { default: 'img/brand/green.png', description: 'Gradido Sidebar app logo', }, - value: { type: Array }, + value: { type: String }, autoClose: { type: Boolean, default: true, diff --git a/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.vue b/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.vue index 4a8979d2c..4cd266975 100644 --- a/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.vue +++ b/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.vue @@ -141,7 +141,6 @@ export default { passwordVisibleNewPwd: false, passwordVisibleNewPwdRepeat: false, loading: true, - } }, methods: {