Skip to content
Snippets Groups Projects
Verified Commit e9d35885 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FIX #9514 fix modal css

parent d95a51c9
No related branches found
No related tags found
No related merge requests found
<h2 mat-dialog-title>{{lang.redirects}}</h2>
<h1 mat-dialog-title>{{lang.redirects}}</h1>
<mat-dialog-content style="overflow:inherit;">
<form #redirectConfForm="ngForm">
<div class="modal-body">
......
<h1 mat-dialog-title>{{modalTitle}}</h1>
<form #changeDiffListDestForm="ngForm">
<div>
<mat-dialog-content *ngIf="data.isDeletable">
<div class="modal-body" *ngIf="data.inDiffListDest">
<h2 mat-dialog-title>{{lang.redirectUserListDiff}}</h2>
<div class="alert alert-warning" role="alert">
<b>{{this.data.userDestRedirect.firstname}} {{this.data.userDestRedirect.lastname}}</b>&nbsp;<span [innerHTML]="lang.chooseNewDest"></span> :
</div>
<ng-container *ngIf="data.isDeletable">
<mat-dialog-content>
<div class="modal-body" *ngIf="data.inDiffListDest">
<h2>{{lang.redirectUserListDiff}}</h2>
<div class="alert alert-warning" role="alert">
<b>{{this.data.userDestRedirect.firstname}} {{this.data.userDestRedirect.lastname}}</b>&nbsp;<span
[innerHTML]="lang.chooseNewDest"></span> :
</div>
<div *ngFor="let redirectModel of data.redirectListModels; index as i" id="{{redirectModel.object_id}}" class="form-group">
<mat-form-field class="example-full-width">
<input name="redirectModel_{{i}}" id="redirectModel_{{i}}" [(ngModel)]="redirectModel.redirectUserId"
type="text" placeholder="{{lang.newDest}} : {{redirectModel.title}}" matInput [matAutocomplete]="auto"
[formControl]="userCtrl" required>
<mat-autocomplete #auto="matAutocomplete">
<ng-container *ngFor="let user of filteredUsers | async">
<mat-option [value]="user.id" *ngIf="this.data.userDestRedirect.user_id != user.id">
<div class="container-fluid">
<span class="col-xm-1">
<mat-icon color="primary" class="fa fa-user fa-2x" style="margin-right:0px;"></mat-icon>
</span>
<span class="col-xm-11">
{{ user.idToDisplay }}
<small>{{ user.otherInfo }}</small>
</span>
</div>
</mat-option>
</ng-container>
</mat-autocomplete>
</mat-form-field>
<div *ngFor="let redirectModel of data.redirectListModels; index as i" id="{{redirectModel.object_id}}"
class="form-group">
<mat-form-field class="example-full-width">
<input name="redirectModel_{{i}}" id="redirectModel_{{i}}" [(ngModel)]="redirectModel.redirectUserId"
type="text" placeholder="{{lang.newDest}} : {{redirectModel.title}}" matInput
[matAutocomplete]="auto" [formControl]="userCtrl" required>
<mat-autocomplete #auto="matAutocomplete">
<ng-container *ngFor="let user of filteredUsers | async">
<mat-option [value]="user.id" *ngIf="this.data.userDestRedirect.user_id != user.id">
<div class="container-fluid">
<span class="col-xm-1">
<mat-icon color="primary" class="fa fa-user fa-2x" style="margin-right:0px;"></mat-icon>
</span>
<span class="col-xm-11">
{{ user.idToDisplay }}
<small>{{ user.otherInfo }}</small>
</span>
</div>
</mat-option>
</ng-container>
</mat-autocomplete>
</mat-form-field>
</div>
</div>
</div>
<div class="modal-body" *ngIf="data.isResDestUser">
<h2 mat-dialog-title>{{lang.redirectUserListInstances}}</h2>
<div class="alert alert-warning" role="alert">
<b>{{this.data.userDestRedirect.firstname}} {{this.data.userDestRedirect.lastname}}</b>&nbsp;<span [innerHTML]="lang.chooseNewDestUser"></span> :
</div>
<div class="modal-body" *ngIf="data.isResDestUser">
<h2>{{lang.redirectUserListInstances}}</h2>
<div class="alert alert-warning" role="alert">
<b>{{this.data.userDestRedirect.firstname}} {{this.data.userDestRedirect.lastname}}</b>&nbsp;<span
[innerHTML]="lang.chooseNewDestUser"></span> :
</div>
<div id="{{this.data.userDestRedirect.user_id}}" class="form-group">
<mat-form-field class="example-full-width">
<input name="redirectModel_resDest" id="redirectModel_resDest" [(ngModel)]="this.data.redirectDestResUserId"
type="text" placeholder="{{lang.newDestRes}} : " matInput [matAutocomplete]="auto"
[formControl]="userCtrl" required>
<mat-autocomplete #auto="matAutocomplete">
<ng-container *ngFor="let user of filteredUsers | async">
<mat-option [value]="user.id" *ngIf="this.data.userDestRedirect.user_id != user.id">
<div class="container-fluid">
<span class="col-xm-1">
<mat-icon color="primary" class="fa fa-user fa-2x" style="margin-right:0px;"></mat-icon>
</span>
<span class="col-xm-11">
{{ user.idToDisplay }}
<small>{{ user.otherInfo }}</small>
</span>
</div>
</mat-option>
</ng-container>
</mat-autocomplete>
</mat-form-field>
<div id="{{this.data.userDestRedirect.user_id}}" class="form-group">
<mat-form-field class="example-full-width">
<input name="redirectModel_resDest" id="redirectModel_resDest" [(ngModel)]="this.data.redirectDestResUserId"
type="text" placeholder="{{lang.newDestRes}} : " matInput [matAutocomplete]="auto"
[formControl]="userCtrl" required>
<mat-autocomplete #auto="matAutocomplete">
<ng-container *ngFor="let user of filteredUsers | async">
<mat-option [value]="user.id" *ngIf="this.data.userDestRedirect.user_id != user.id">
<div class="container-fluid">
<span class="col-xm-1">
<mat-icon color="primary" class="fa fa-user fa-2x" style="margin-right:0px;"></mat-icon>
</span>
<span class="col-xm-11">
{{ user.idToDisplay }}
<small>{{ user.otherInfo }}</small>
</span>
</div>
</mat-option>
</ng-container>
</mat-autocomplete>
</mat-form-field>
</div>
</div>
</div>
<div class="modal-body" *ngIf="!data.inDiffListDest && !data.isResDestUser">
<h2 mat-dialog-title>{{lang.confirmAction}}</h2>
<div class="alert" role="alert">
<b *ngIf="data.userDestRedirect.mode == 'delete'">{{lang.delete}} {{this.data.userDestRedirect.firstname}} {{this.data.userDestRedirect.lastname}}</b>&nbsp;
<b *ngIf="data.userDestRedirect.mode == 'suspend'">{{lang.suspend}} {{this.data.userDestRedirect.firstname}} {{this.data.userDestRedirect.lastname}}</b>&nbsp;
<div class="modal-body" *ngIf="!data.inDiffListDest && !data.isResDestUser">
<div class="alert" role="alert">
<b *ngIf="data.userDestRedirect.mode == 'delete'">{{lang.delete}}
{{this.data.userDestRedirect.firstname}} {{this.data.userDestRedirect.lastname}}</b>&nbsp;
<b *ngIf="data.userDestRedirect.mode == 'suspend'">{{lang.suspend}}
{{this.data.userDestRedirect.firstname}} {{this.data.userDestRedirect.lastname}}</b>&nbsp;
</div>
</div>
</div>
</mat-dialog-content>
</mat-dialog-content>
</ng-container>
<mat-dialog-content *ngIf="!data.isDeletable">
<ng-container *ngIf="!data.isDeletable">
<mat-dialog-content>
<div class="modal-body">
<h2 mat-dialog-title *ngIf="this.data.userDestRedirect.mode == 'delete'">{{lang.unableToDelete}}</h2>
<h2 mat-dialog-title *ngIf="this.data.userDestRedirect.mode == 'suspend'">{{lang.unableToSuspend}}</h2>
<div class="alert alert-warning" role="alert">
<p><span [innerHTML]="lang.userIsNotDeletable"></span> <b>{{this.data.userDestRedirect.firstname}} {{this.data.userDestRedirect.lastname}}</b>&nbsp;</p>
<p><span [innerHTML]="lang.userIsNotDeletable"></span> <b>{{this.data.userDestRedirect.firstname}}
{{this.data.userDestRedirect.lastname}}</b>&nbsp;</p>
<p><span [innerHTML]="lang.userIsDeletableBy"></span></p>
</div>
</div>
<div class="modal-body" *ngIf="data.inTemplateList" class="col-md-6">
<div class="modal-body" *ngIf="data.inTemplateList" class="col-md-6">
<mat-list>
<p mat-line>{{lang.diffusionList}}</p>
<mat-list-item *ngFor="let templateEntity of data.listTemplateEntities">
......@@ -100,15 +108,17 @@
</mat-list-item>
</mat-list>
</div>
</mat-dialog-content>
</mat-dialog-content>
</ng-container>
<mat-dialog-actions>
<button mat-raised-button color="warn" *ngIf="data.userDestRedirect.mode == 'delete' && data.isDeletable" type="submit" class="btn btn-danger" (click)="dialogRef.close(this.data)"
[disabled]="!sendFunction()">{{lang.delete}} {{lang.user}}</button>
<button mat-raised-button color="primary" *ngIf="data.userDestRedirect.mode == 'suspend' && data.isDeletable" type="submit" (click)="dialogRef.close(this.data)"
[disabled]="!sendFunction()">{{lang.suspend}} {{lang.user}}</button>
<button mat-raised-button color="primary" *ngIf="!data.isDeletable" type="submit" (click)="dialogRef.close()"
>{{lang.close}}</button>
<button mat-raised-button color="warn" *ngIf="data.userDestRedirect.mode == 'delete' && data.isDeletable"
type="submit" class="btn btn-danger" (click)="dialogRef.close(this.data)" [disabled]="!sendFunction()">{{lang.delete}}
{{lang.user}}</button>
<button mat-raised-button color="primary" *ngIf="data.userDestRedirect.mode == 'suspend' && data.isDeletable"
type="submit" (click)="dialogRef.close(this.data)" [disabled]="!sendFunction()">{{lang.suspend}}
{{lang.user}}</button>
<button mat-raised-button color="primary" *ngIf="!data.isDeletable" type="submit" (click)="dialogRef.close()">{{lang.close}}</button>
</mat-dialog-actions>
</div>
</form>
\ No newline at end of file
......@@ -414,6 +414,7 @@ export class UsersAdministrationRedirectModalComponent extends AutoCompletePlugi
lang: any = LANG;
loadModel: boolean = false;
loadInstance: boolean = false;
modalTitle: string = this.lang.confirmAction;
constructor(public http: HttpClient, @Inject(MAT_DIALOG_DATA) public data: any, public dialogRef: MatDialogRef<UsersAdministrationRedirectModalComponent>) {
super(http, ['users']);
......@@ -432,6 +433,11 @@ export class UsersAdministrationRedirectModalComponent extends AutoCompletePlugi
this.data.isResDestUser = true;
}
} else {
if (this.data.userDestRedirect.mode == 'delete') {
this.modalTitle = this.lang.unableToDelete;
} else {
this.modalTitle = this.lang.unableToSuspend;
}
//get listModel
if (this.data.listTemplateEntities.length > 0) {
this.data.inTemplateList = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment