From ae057aaf928aa65987fde3afb625bec05375caea Mon Sep 17 00:00:00 2001
From: Hamza HRAMCHI <hamza.hramchi@xelians.fr>
Date: Wed, 2 Feb 2022 17:36:26 +0100
Subject: [PATCH] FIX #18492 TIME 0:10 add warning note

---
 src/frontend/app/notes/note-editor.component.html          | 4 +++-
 src/frontend/app/notes/note-editor.component.scss          | 7 +++++++
 .../sent-numeric-package-page.component.html               | 1 +
 .../sent-numeric-package-page.component.scss               | 7 +++++++
 src/lang/lang-en.json                                      | 3 ++-
 src/lang/lang-fr.json                                      | 3 ++-
 6 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/src/frontend/app/notes/note-editor.component.html b/src/frontend/app/notes/note-editor.component.html
index c84255ee7c6..3e65c11e19d 100755
--- a/src/frontend/app/notes/note-editor.component.html
+++ b/src/frontend/app/notes/note-editor.component.html
@@ -1,5 +1,7 @@
 <mat-form-field appearance="outline" class="noteEditorContent">
-    <textarea matInput placeholder="{{title}}" [(ngModel)]="content"></textarea>
+    <textarea matInput id="inputNote" [placeholder]="title" [(ngModel)]="content"></textarea>
+    <hr style="margin-bottom: 10px;">
+    <span class="warningNote">{{'lang.warningNote' | translate}}</span>
     <button matSuffix color="primary" mat-icon-button title="{{'lang.options' | translate}}" [matMenuTriggerFor]="menuMain">
         <mat-icon fontSet="fas" fontIcon="fa-angle-right fa-2x"></mat-icon>
     </button>
diff --git a/src/frontend/app/notes/note-editor.component.scss b/src/frontend/app/notes/note-editor.component.scss
index 38c4e846b44..c8c03072715 100644
--- a/src/frontend/app/notes/note-editor.component.scss
+++ b/src/frontend/app/notes/note-editor.component.scss
@@ -61,4 +61,11 @@
         padding : 0px;
         padding-bottom: 5px;
     }
+}
+
+.warningNote {
+    font-style: italic;
+    opacity: 0.5;
+    margin-bottom: 10px;
+    font-size: 13px;
 }
\ No newline at end of file
diff --git a/src/frontend/app/sentResource/sent-numeric-package-page/sent-numeric-package-page.component.html b/src/frontend/app/sentResource/sent-numeric-package-page/sent-numeric-package-page.component.html
index 8c966e59ac9..87395884549 100755
--- a/src/frontend/app/sentResource/sent-numeric-package-page/sent-numeric-package-page.component.html
+++ b/src/frontend/app/sentResource/sent-numeric-package-page/sent-numeric-package-page.component.html
@@ -163,6 +163,7 @@
                 <mat-label class="attachLabel">{{'lang.note' | translate}}</mat-label>
                 <textarea matInput [placeholder]="'lang.addNoteToNumericPackage' | translate" [(ngModel)]="numericPackage.content"
                     matTextareaAutosize style="padding:0" [readonly]="!canManageMail()"></textarea>
+                <mat-hint class="warningNote">{{'lang.warningNote' | translate}}</mat-hint>
             </mat-form-field>
         </div>
     </mat-dialog-content>
diff --git a/src/frontend/app/sentResource/sent-numeric-package-page/sent-numeric-package-page.component.scss b/src/frontend/app/sentResource/sent-numeric-package-page/sent-numeric-package-page.component.scss
index 84376e19df2..e6fdb8f32ff 100644
--- a/src/frontend/app/sentResource/sent-numeric-package-page/sent-numeric-package-page.component.scss
+++ b/src/frontend/app/sentResource/sent-numeric-package-page/sent-numeric-package-page.component.scss
@@ -117,4 +117,11 @@
     padding: 10px;
     opacity: 0.5;
     font-style: italic;
+}
+
+.warningNote {
+    font-style: italic;
+    opacity: 0.5;
+    margin-bottom: 10px;
+    font-size: 13px;
 }
\ No newline at end of file
diff --git a/src/lang/lang-en.json b/src/lang/lang-en.json
index d81c57ef414..77d3552c21c 100644
--- a/src/lang/lang-en.json
+++ b/src/lang/lang-en.json
@@ -2634,5 +2634,6 @@
     "summarySheetMandatory": "<b>You must attach a summary sheet in case of mass printing</b>",
     "goToNextDocument": "Force the passage to the next document when the document leaves the perimeter of the basket",
     "uploadNewVersion": "Upload a new version of the document",
-    "fileNotConvertible": "Only convertible files are allowed"
+    "fileNotConvertible": "Only convertible files are allowed",
+    "warningNote": "Please note that your comment must be neutral, factual, objective and respectful of the people concerned, never excessive or insulting."
 }
diff --git a/src/lang/lang-fr.json b/src/lang/lang-fr.json
index 585fbed7fe3..410dd9ff3dd 100644
--- a/src/lang/lang-fr.json
+++ b/src/lang/lang-fr.json
@@ -2632,5 +2632,6 @@
     "summarySheetMandatory": "<b>Vous devez attacher une fiche de liaison en cas d'impression de masse</b>",
     "goToNextDocument": "Forcer le passage au document suivant quand le document sort du périmètre de la bannette",
     "uploadNewVersion": "Téléverser une nouvelle version du document",
-    "fileNotConvertible": "Seuls les fichiers convertibles sont autorisés"
+    "fileNotConvertible": "Seuls les fichiers convertibles sont autorisés",
+    "warningNote": "Attention votre commentaire doit être neutre, factuel, objectif et respectueux des personnes concernées, jamais excessif ou insultant."
 }
-- 
GitLab