From 088923f0e4f36183edeeb1e8b27c52a1d020a6f1 Mon Sep 17 00:00:00 2001
From: Nestor <npegane@hotmail.com>
Date: Mon, 16 Jul 2018 17:26:13 +0200
Subject: [PATCH] FEAT #7659 password history desc added in views

---
 .../js/angular/app/password-modification.component.ts      | 7 +++++++
 apps/maarch_entreprise/js/angular/app/profile.component.ts | 7 +++++++
 apps/maarch_entreprise/js/angular/lang/lang-fr.ts          | 2 ++
 3 files changed, 16 insertions(+)

diff --git a/apps/maarch_entreprise/js/angular/app/password-modification.component.ts b/apps/maarch_entreprise/js/angular/app/password-modification.component.ts
index 86b22b9ede9..ab564a04ea6 100644
--- a/apps/maarch_entreprise/js/angular/app/password-modification.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/password-modification.component.ts
@@ -37,6 +37,7 @@ export class PasswordModificationComponent implements OnInit {
         complexityNumber: { enabled: false, value: 0 },
         complexitySpecial: { enabled: false, value: 0 },
         renewal: { enabled: false, value: 0 },
+        historyLastUse: {enabled:false, value:0},
     };
 
     passwordModel: any = {
@@ -137,6 +138,12 @@ export class PasswordModificationComponent implements OnInit {
                         this.passwordRules.renewal.enabled = rule.enabled;
                         this.passwordRules.renewal.value = rule.value;
                         this.OtherRuleText = this.lang['password' + rule.label] + ' <b>' + rule.value + ' ' + this.lang.days + '</b>. ' + this.lang['password2' + rule.label];
+                    } else if (rule.label == 'historyLastUse') {
+                        this.passwordRules.historyLastUse.enabled = rule.enabled;
+                        this.passwordRules.historyLastUse.value = rule.value
+                        if (rule.enabled) {
+                            ruleTextArr.push(this.lang['passwordhistoryLastUseDesc'] + ' ' + rule.value + ' ' + this.lang['passwordhistoryLastUseDesc2']);
+                        }
                     }
 
                 });
diff --git a/apps/maarch_entreprise/js/angular/app/profile.component.ts b/apps/maarch_entreprise/js/angular/app/profile.component.ts
index 260927fcd51..87b6e5dbfdb 100755
--- a/apps/maarch_entreprise/js/angular/app/profile.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/profile.component.ts
@@ -51,6 +51,7 @@ export class ProfileComponent extends AutoCompletePlugin implements OnInit {
         complexityNumber: { enabled: false, value: 0 },
         complexitySpecial: { enabled: false, value: 0 },
         renewal: { enabled: false, value: 0 },
+        historyLastUse: {enabled:false, value:0},
     };
     signatureModel: any = {
         base64: "",
@@ -782,6 +783,12 @@ export class ProfileComponent extends AutoCompletePlugin implements OnInit {
                         this.passwordRules.renewal.enabled = rule.enabled;
                         this.passwordRules.renewal.value = rule.value;
                         this.OtherRuleText = this.lang['password' + rule.label] + ' <b>' + rule.value + ' ' + this.lang.days + '</b>. ' + this.lang['password2' + rule.label];
+                    } else if (rule.label == 'historyLastUse') {
+                        this.passwordRules.historyLastUse.enabled = rule.enabled;
+                        this.passwordRules.historyLastUse.value = rule.value
+                        if (rule.enabled) {
+                            ruleTextArr.push(this.lang['passwordhistoryLastUseDesc'] + ' ' + rule.value + ' ' + this.lang['passwordhistoryLastUseDesc2']);
+                        }
                     }
 
                 });
diff --git a/apps/maarch_entreprise/js/angular/lang/lang-fr.ts b/apps/maarch_entreprise/js/angular/lang/lang-fr.ts
index cdc7077d593..5e4b2b91fef 100755
--- a/apps/maarch_entreprise/js/angular/lang/lang-fr.ts
+++ b/apps/maarch_entreprise/js/angular/lang/lang-fr.ts
@@ -605,6 +605,8 @@ export const LANG_FR = {
     "passwordcomplexityNumberRequired"  : "Chiffre requis",
     "passwordcomplexitySpecialRequired" : "Caractère spécial requis",
     "passwordrenewalRequired"           : "Expiration du mot de passe",
+    "passwordhistoryLastUseDesc"        : "Vous ne pouvez utilisez que vos",
+    "passwordhistoryLastUseDesc2"       : "derniers mots de passe",
     "passwordhistoryLastUseRequired"    : "Nombre de mot passe sauvegardé",
     "passwordlockAttemptsRequired"      : "Nombre de tentative de connexion",
     "passwordlockTimeRequired"          : "Temps de blocage",
-- 
GitLab