From cd40651e831a094f539e3d4a688a4477d5269ffd Mon Sep 17 00:00:00 2001 From: "florian.azizian" <florian.azizian@maarch.org> Date: Thu, 12 Apr 2018 17:26:10 +0100 Subject: [PATCH] FIX remove circle id already exists --- .../Views/basket-administration.component.html | 2 +- .../Views/priorities-administration.component.html | 2 +- .../Views/status-administration.component.html | 2 +- src/app/basket/controllers/BasketController.php | 2 +- src/app/group/controllers/GroupController.php | 2 +- src/app/user/controllers/UserController.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/maarch_entreprise/Views/basket-administration.component.html b/apps/maarch_entreprise/Views/basket-administration.component.html index 7e3cfa24e8a..f25f3159793 100644 --- a/apps/maarch_entreprise/Views/basket-administration.component.html +++ b/apps/maarch_entreprise/Views/basket-administration.component.html @@ -40,7 +40,7 @@ <mat-form-field> <input matInput *ngIf="creationMode" name="identifier" placeholder="{{lang.id}}" [(ngModel)]="basket.id" (blur)="isAvailable()" maxlength="32" pattern="^[\w.-]*$" required> - <i *ngIf="creationMode" class="fa fa-circle-o" aria-hidden="true" [ngStyle]="{'color': basketIdAvailable ? 'green' : 'red'}"></i> + <!-- <i *ngIf="creationMode" class="fa fa-circle-o" aria-hidden="true" [ngStyle]="{'color': basketIdAvailable ? 'green' : 'red'}"></i> --> <input matInput *ngIf="!creationMode" name="identifier" placeholder="{{lang.id}}" title="{{lang.id}}" [(ngModel)]="basket.id" required disabled> </mat-form-field> diff --git a/apps/maarch_entreprise/Views/priorities-administration.component.html b/apps/maarch_entreprise/Views/priorities-administration.component.html index 1b080a7cdd5..e515a595314 100755 --- a/apps/maarch_entreprise/Views/priorities-administration.component.html +++ b/apps/maarch_entreprise/Views/priorities-administration.component.html @@ -55,7 +55,7 @@ <input type="color" value="{{element.color}}" style="background:none;border:none;width:45px;" disabled> {{element.label}} </mat-cell> </ng-container> <ng-container matColumnDef="delays"> - <mat-header-cell *matHeaderCellDef mat-sort-header [class.hide-for-mobile]="mobileQuery.matches">{{lang.processDelay}}</mat-header-cell> + <mat-header-cell *matHeaderCellDef mat-sort-header [class.hide-for-mobile]="mobileQuery.matches">{{lang.processDelayDay}}</mat-header-cell> <mat-cell *matCellDef="let element" [class.hide-for-mobile]="mobileQuery.matches"> <span *ngIf="element.delays == null"> <i style="opacity:0.5">{{lang.processDelayDoctype}}</i> diff --git a/apps/maarch_entreprise/Views/status-administration.component.html b/apps/maarch_entreprise/Views/status-administration.component.html index 571e69953a8..07c8d8faab0 100755 --- a/apps/maarch_entreprise/Views/status-administration.component.html +++ b/apps/maarch_entreprise/Views/status-administration.component.html @@ -30,7 +30,7 @@ <mat-form-field> <input matInput [formControl]="statusId" [(ngModel)]="status.id" *ngIf="creationMode" maxlength="10" name="id" id="id" title="{{lang.id}}" placeholder="{{lang.id}}" (blur)="isAvailable()" type="text" pattern="^[\w.-]*$" required> - <i *ngIf="creationMode" class="fa fa-circle-o" aria-hidden="true" [ngStyle]="{'color': statusIdAvailable ? 'green' : 'red'}"></i> + <!-- <i *ngIf="creationMode" class="fa fa-circle-o" aria-hidden="true" [ngStyle]="{'color': statusIdAvailable ? 'green' : 'red'}"></i> --> <input matInput [(ngModel)]="status.id" *ngIf="!creationMode" maxlength="10" name="id" id="id" title="{{lang.id}}" placeholder="{{lang.id}}" required disabled> <mat-error *ngIf="statusId.invalid">{{getErrorMessage()}}</mat-error> diff --git a/src/app/basket/controllers/BasketController.php b/src/app/basket/controllers/BasketController.php index 8ffe4a05f15..9094848d792 100644 --- a/src/app/basket/controllers/BasketController.php +++ b/src/app/basket/controllers/BasketController.php @@ -69,7 +69,7 @@ class BasketController $existingBasket = BasketModel::getById(['id' => $data['id'], 'select' => ['1']]); if (!empty($existingBasket)) { - return $response->withStatus(400)->withJson(['errors' => 'Basket already exists']); + return $response->withStatus(400)->withJson(['errors' => _ID. ' ' . _ALREADY_EXISTS]); } if (!PreparedClauseController::isRequestValid(['clause' => $data['clause'], 'userId' => $GLOBALS['userId']])) { diff --git a/src/app/group/controllers/GroupController.php b/src/app/group/controllers/GroupController.php index 0b8d9574f49..9536e74d5b2 100644 --- a/src/app/group/controllers/GroupController.php +++ b/src/app/group/controllers/GroupController.php @@ -58,7 +58,7 @@ class GroupController $existingGroup = GroupModel::getByGroupId(['groupId' => $data['group_id'], 'select' => ['1']]); if (!empty($existingGroup)) { - return $response->withStatus(400)->withJson(['errors' => 'Group already exists']); + return $response->withStatus(400)->withJson(['errors' => _ID. ' ' . _ALREADY_EXISTS]); } if (!PreparedClauseController::isRequestValid(['clause' => $data['security']['where_clause'], 'userId' => $GLOBALS['userId']])) { diff --git a/src/app/user/controllers/UserController.php b/src/app/user/controllers/UserController.php index c8879c9267c..ac59638dc32 100644 --- a/src/app/user/controllers/UserController.php +++ b/src/app/user/controllers/UserController.php @@ -130,7 +130,7 @@ class UserController $existingUser = UserModel::getByUserId(['userId' => $data['userId'], 'select' => ['1']]); if (!empty($existingUser)) { - return $response->withStatus(400)->withJson(['errors' => 'User already exists']); + return $response->withStatus(400)->withJson(['errors' => _ID . ' ' . _ALREADY_EXISTS]); } $logingModes = ['standard', 'restMode']; -- GitLab