From 8a5e0c54026088a1119adb3e66be20831c6b4971 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Thu, 11 Jul 2019 07:06:53 +0200 Subject: [PATCH] Notify password changes #1588 --- modules/client/front/web-access/index.js | 7 +++++-- modules/client/front/web-access/locale/es.yml | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/client/front/web-access/index.js b/modules/client/front/web-access/index.js index 5e7510853..6282db5fb 100644 --- a/modules/client/front/web-access/index.js +++ b/modules/client/front/web-access/index.js @@ -44,16 +44,19 @@ export default class Controller { if (response == 'ACCEPT') { try { if (!this.newPassword) - throw new Error(`Passwords can't be empty`); + throw new Error(`You must enter a new password`); if (this.newPassword != this.repeatPassword) throw new Error(`Passwords don't match`); let account = { password: this.newPassword }; - this.$http.patch(`/client/api/Accounts/${this.client.id}`, account); + this.$http.patch(`/client/api/Accounts/${this.client.id}`, account).then(res => { + this.vnApp.showSuccess(this.$translate.instant('Data saved!')); + }); } catch (e) { this.vnApp.showError(this.$translate.instant(e.message)); + return false; } } diff --git a/modules/client/front/web-access/locale/es.yml b/modules/client/front/web-access/locale/es.yml index 2d1905c16..4a3ac0ab4 100644 --- a/modules/client/front/web-access/locale/es.yml +++ b/modules/client/front/web-access/locale/es.yml @@ -2,4 +2,6 @@ User: Usuario Enable web access: Habilitar acceso web New password: Nueva contraseña Repeat password: Repetir contraseña -Change password: Cambiar contraseña \ No newline at end of file +Change password: Cambiar contraseña +Passwords don't match: Las contraseñas no coinciden +You must enter a new password: Debes introducir una nueva contraseña \ No newline at end of file