From d465beb72a06bab8290fab4de27b17ccee6176a3 Mon Sep 17 00:00:00 2001
From: Hamza HRAMCHI <hamza.hramchi@xelians.fr>
Date: Fri, 17 Dec 2021 16:31:44 +0100
Subject: [PATCH] FIX #15943 TIME 0:15 fix css + set annotator role as default
 + update config.default.xml

---
 config/config.xml.default                     |  5 +++
 .../app/administration/user/user.component.ts | 38 ++++++++++---------
 .../app/document/document.component.html      |  2 +-
 .../app/document/document.component.scss      |  2 -
 4 files changed, 26 insertions(+), 21 deletions(-)

diff --git a/config/config.xml.default b/config/config.xml.default
index ba2940d35a..0b77d8d224 100755
--- a/config/config.xml.default
+++ b/config/config.xml.default
@@ -72,5 +72,10 @@
             <id>external</id>
             <color>#FF0000</color>
         </mode>
+        <mode>
+            <id>note</id>
+            <color>#473632</color>
+            <issuer></issuer>
+        </mode>
     </signatureModes>
 </ROOT>
diff --git a/src/frontend/app/administration/user/user.component.ts b/src/frontend/app/administration/user/user.component.ts
index c96cc21abd..de96d70c33 100644
--- a/src/frontend/app/administration/user/user.component.ts
+++ b/src/frontend/app/administration/user/user.component.ts
@@ -103,7 +103,7 @@ export class UserComponent implements OnInit {
                     email: '',
                     phone: '',
                     picture: '',
-                    signatureModes: ['stamp'],
+                    signatureModes: ['stamp', 'note'],
                     isRest: false,
                     canSendActivationNotification: false
                 };
@@ -187,23 +187,25 @@ export class UserComponent implements OnInit {
 
     createUser() {
         this.loading = true;
-        this.http.post('../rest/users', this.user)
-            .pipe(
-                finalize(() => this.loading = false),
-                tap((data: any) => {
-                    if (this.user.isRest) {
-                        this.user.id = data.id;
-                        this.updateRestUser();
-                    }
-                    this.router.navigate(['/administration/users']);
-                    this.notificationService.success('lang.userAdded');
-                }),
-                catchError((err: any) => {
-                    this.notificationService.handleErrors(err);
-                    return of(false);
-                })
-            )
-            .subscribe();
+        console.log(this.user);
+
+        // this.http.post('../rest/users', this.user)
+        //     .pipe(
+        //         finalize(() => this.loading = false),
+        //         tap((data: any) => {
+        //             if (this.user.isRest) {
+        //                 this.user.id = data.id;
+        //                 this.updateRestUser();
+        //             }
+        //             this.router.navigate(['/administration/users']);
+        //             this.notificationService.success('lang.userAdded');
+        //         }),
+        //         catchError((err: any) => {
+        //             this.notificationService.handleErrors(err);
+        //             return of(false);
+        //         })
+        //     )
+        //     .subscribe();
     }
 
     delete() {
diff --git a/src/frontend/app/document/document.component.html b/src/frontend/app/document/document.component.html
index 3c866fa1be..b716b9a46e 100755
--- a/src/frontend/app/document/document.component.html
+++ b/src/frontend/app/document/document.component.html
@@ -133,7 +133,7 @@
     </ng-container>
 
 </ion-content>
-<ion-footer *ngIf="!loadingImage && currentDoc === 0" class="ion-no-border footer-buttons">
+<ion-footer *ngIf="!loadingImage && currentDoc === 0" class="ion-no-border footer-buttons" [ngStyle]="{'grid-template-columns': actionsList.length === 2 ? 'repeat(2, 1fr)' : 'repeat(3, 1fr)'}">
     <ion-button [disabled]="mainDocument.status === 'CONVERTING'" *ngFor="let action of actionsList" [color]="action.color" shape="round" size="large" fill="outline" (click)="launchEvent(action)">
         <ion-icon *ngIf="action.logo !== ''" [slot]="'start'" [name]="action.logo"></ion-icon>
         <ion-label style="font-size: 13px;">{{action.label | translate}}</ion-label>
diff --git a/src/frontend/app/document/document.component.scss b/src/frontend/app/document/document.component.scss
index 0583c6c979..5719a22075 100644
--- a/src/frontend/app/document/document.component.scss
+++ b/src/frontend/app/document/document.component.scss
@@ -361,9 +361,7 @@ button.disabled {
 
 .footer-buttons {
     display: grid;
-    grid-template-columns: repeat(3, 1fr);
     padding: 10px;
-
     ion-button {
         margin: auto;
         width: 150px;
-- 
GitLab