From 532356bf6520d17626eb19433faeb0b9831bf041 Mon Sep 17 00:00:00 2001
From: "florian.azizian" <florian.azizian@maarch.org>
Date: Thu, 18 Jan 2018 10:21:46 +0100
Subject: [PATCH] FIX #4 admin status language

---
 .../Views/status-administration.component.html         |  2 +-
 apps/maarch_entreprise/css/engine.css                  |  1 +
 .../administration/status-administration.component.js  |  4 ++--
 .../administration/status-administration.component.ts  | 10 +++++-----
 .../statuses-administration.component.js               |  2 +-
 .../statuses-administration.component.ts               |  2 +-
 apps/maarch_entreprise/lang/fr.php                     |  2 +-
 7 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/apps/maarch_entreprise/Views/status-administration.component.html b/apps/maarch_entreprise/Views/status-administration.component.html
index 881d9c4d676..985a449b376 100755
--- a/apps/maarch_entreprise/Views/status-administration.component.html
+++ b/apps/maarch_entreprise/Views/status-administration.component.html
@@ -11,7 +11,7 @@
             <div class="form-group">
                 <div class="col-sm-12">
                     <mat-form-field>
-                        <input matInput [(ngModel)]="status.id" [disabled]="mode == 'update'" maxlength="10" name="id" id="id" title="{{lang.id}}" placeholder="{{lang.id}}" type="text" required>
+                        <input matInput [(ngModel)]="status.id" [disabled]="!creationMode" maxlength="10" name="id" id="id" title="{{lang.id}}" placeholder="{{lang.id}}" type="text" required>
                     </mat-form-field>
                 </div>
             </div>
diff --git a/apps/maarch_entreprise/css/engine.css b/apps/maarch_entreprise/css/engine.css
index 73c46878603..6efd59d63d9 100755
--- a/apps/maarch_entreprise/css/engine.css
+++ b/apps/maarch_entreprise/css/engine.css
@@ -35,6 +35,7 @@
 
 .page-header{
     margin-top: 0px;
+    border-bottom: none !important;
 }
 
 .page-header h1{
diff --git a/apps/maarch_entreprise/js/angular/app/administration/status-administration.component.js b/apps/maarch_entreprise/js/angular/app/administration/status-administration.component.js
index 1b4ab3aa61c..dcae5a20136 100755
--- a/apps/maarch_entreprise/js/angular/app/administration/status-administration.component.js
+++ b/apps/maarch_entreprise/js/angular/app/administration/status-administration.component.js
@@ -107,7 +107,7 @@ var StatusAdministrationComponent = /** @class */ (function () {
         if (this.creationMode == true) {
             this.http.post(this.coreUrl + 'rest/status', this.status)
                 .subscribe(function (data) {
-                _this.notify.success(_this.lang.statusAdded + ' « ' + data.status.id + ' »');
+                _this.notify.success(_this.lang.statusAdded);
                 _this.router.navigate(['administration/status']);
             }, function (err) {
                 _this.notify.error(JSON.parse(err._body).errors);
@@ -116,7 +116,7 @@ var StatusAdministrationComponent = /** @class */ (function () {
         else if (this.creationMode == false) {
             this.http.put(this.coreUrl + 'rest/status/' + this.statusIdentifier, this.status)
                 .subscribe(function (data) {
-                _this.notify.success(_this.lang.statusUpdated + ' « ' + data.status.id + ' »');
+                _this.notify.success(_this.lang.statusUpdated);
                 _this.router.navigate(['administration/status']);
             }, function (err) {
                 _this.notify.error(JSON.parse(err._body).errors);
diff --git a/apps/maarch_entreprise/js/angular/app/administration/status-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/status-administration.component.ts
index caad7f78d19..3720d1fb3e5 100755
--- a/apps/maarch_entreprise/js/angular/app/administration/status-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/status-administration.component.ts
@@ -46,11 +46,11 @@ export class StatusAdministrationComponent implements OnInit {
             if (typeof params['identifier'] == "undefined"){
                 this.http.get(this.coreUrl + 'rest/administration/status/new')
                 .subscribe((data) => {
-                    this.status.img_filename = "fm-letter";
+                    this.status.img_filename    = "fm-letter";
                     this.status.can_be_searched = true
                     this.status.can_be_modified = true
-                    this.statusImages = data['statusImages'];
-                    this.creationMode = true;
+                    this.statusImages           = data['statusImages'];
+                    this.creationMode           = true;
                     this.updateBreadcrumb(angularGlobals.applicationName);
                     this.loading = false;
                 });
@@ -109,7 +109,7 @@ export class StatusAdministrationComponent implements OnInit {
         if(this.creationMode == true){
             this.http.post(this.coreUrl + 'rest/status', this.status)
             .subscribe((data : any) => {
-                this.notify.success(this.lang.statusAdded+' « '+data.status.id+' »');
+                this.notify.success(this.lang.statusAdded);
                 this.router.navigate(['administration/status']);
             }, (err) => {
                 this.notify.error(JSON.parse(err._body).errors);
@@ -118,7 +118,7 @@ export class StatusAdministrationComponent implements OnInit {
 
             this.http.put(this.coreUrl+'rest/status/'+this.statusIdentifier, this.status)
             .subscribe((data : any) => {
-                this.notify.success(this.lang.statusUpdated+' « '+data.status.id+' »');
+                this.notify.success(this.lang.statusUpdated);
                 this.router.navigate(['administration/status']);                    
             }, (err) => {
                 this.notify.error(JSON.parse(err._body).errors);
diff --git a/apps/maarch_entreprise/js/angular/app/administration/statuses-administration.component.js b/apps/maarch_entreprise/js/angular/app/administration/statuses-administration.component.js
index ddff74321e8..ec2ce6e2ded 100755
--- a/apps/maarch_entreprise/js/angular/app/administration/statuses-administration.component.js
+++ b/apps/maarch_entreprise/js/angular/app/administration/statuses-administration.component.js
@@ -53,7 +53,7 @@ var StatusesAdministrationComponent = /** @class */ (function () {
             this.http.delete(this.coreUrl + 'rest/status/' + status.identifier)
                 .subscribe(function (data) {
                 _this.data = data.statuses;
-                _this.notify.success(_this.lang.statusDeleted + ' « ' + status.id + ' »');
+                _this.notify.success(_this.lang.statusDeleted);
             }, function (err) {
                 _this.notify.error(JSON.parse(err._body).errors);
             });
diff --git a/apps/maarch_entreprise/js/angular/app/administration/statuses-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/statuses-administration.component.ts
index 719fef1e1b0..27a6d1011d0 100755
--- a/apps/maarch_entreprise/js/angular/app/administration/statuses-administration.component.ts
+++ b/apps/maarch_entreprise/js/angular/app/administration/statuses-administration.component.ts
@@ -63,7 +63,7 @@ export class StatusesAdministrationComponent implements OnInit {
             this.http.delete(this.coreUrl + 'rest/status/'+status.identifier)
                 .subscribe((data : any) => {
                     this.data = data.statuses;
-                    this.notify.success(this.lang.statusDeleted+' « '+status.id+' »');
+                    this.notify.success(this.lang.statusDeleted);
                     
                 }, (err) => {
                     this.notify.error(JSON.parse(err._body).errors);
diff --git a/apps/maarch_entreprise/lang/fr.php b/apps/maarch_entreprise/lang/fr.php
index a354003283d..96f61bcc418 100755
--- a/apps/maarch_entreprise/lang/fr.php
+++ b/apps/maarch_entreprise/lang/fr.php
@@ -56,7 +56,7 @@ if (!defined("_XML_PARAM_SERVICE_DESC"))    define("_XML_PARAM_SERVICE_DESC", "V
 if (!defined("_XML_PARAM_SERVICE"))    define("_XML_PARAM_SERVICE", "Visualisation configuration XML des services");
 if (!defined("_MODULES_SERVICES"))    define("_MODULES_SERVICES", "Services définis par les modules");
 if (!defined("_APPS_SERVICES"))    define("_APPS_SERVICES", "Services définis par l'application");
-if (!defined("_ADMIN_STATUS_DESC"))    define("_ADMIN_STATUS_DESC", "Créer ou modifier des statuts.");
+if (!defined("_ADMIN_STATUS_DESC"))    define("_ADMIN_STATUS_DESC", "Créer ou modifier des statuts");
 if (!defined("_ADMIN_ACTIONS_DESC"))    define("_ADMIN_ACTIONS_DESC", "Créer ou modifier des actions.");
 if (!defined("_ADMIN_SERVICES_UNKNOWN"))    define("_ADMIN_SERVICES_UNKNOWN", "Service d'administration inconnu");
 if (!defined("_NO_RIGHTS_ON"))    define("_NO_RIGHTS_ON", "Aucun droit sur");
-- 
GitLab