2019-10-11 17:47:41 +02:00
|
|
|
<div class="modal fade" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="collectionAddEditTitle">
|
|
|
|
<div class="modal-dialog" role="document">
|
2018-07-13 20:50:21 +02:00
|
|
|
<form class="modal-content" #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate>
|
2018-07-10 16:06:57 +02:00
|
|
|
<div class="modal-header">
|
2019-10-11 17:47:41 +02:00
|
|
|
<h2 class="modal-title" id="collectionAddEditTitle">{{title}}</h2>
|
2019-10-11 17:22:21 +02:00
|
|
|
<button type="button" class="close" data-dismiss="modal" appA11yTitle="{{'close' | i18n}}">
|
2018-07-10 16:06:57 +02:00
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body" *ngIf="loading">
|
2019-10-11 16:35:24 +02:00
|
|
|
<i class="fa fa-spinner fa-spin text-muted" title="{{'loading' | i18n}}" aria-hidden="true"></i>
|
|
|
|
<span class="sr-only">{{'loading' | i18n}}</span>
|
2018-07-10 16:06:57 +02:00
|
|
|
</div>
|
|
|
|
<div class="modal-body" *ngIf="!loading">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="name">{{'name' | i18n}}</label>
|
2018-07-13 20:50:21 +02:00
|
|
|
<input id="name" class="form-control" type="text" name="Name" [(ngModel)]="name" required>
|
2018-07-10 16:06:57 +02:00
|
|
|
</div>
|
2019-03-07 21:18:05 +01:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="externalId">{{'externalId' | i18n}}</label>
|
|
|
|
<input id="externalId" class="form-control" type="text" name="ExternalId" [(ngModel)]="externalId">
|
|
|
|
<small class="form-text text-muted">{{'externalIdDesc' | i18n}}</small>
|
|
|
|
</div>
|
2018-07-30 14:12:47 +02:00
|
|
|
<ng-container *ngIf="accessGroups">
|
|
|
|
<h3 class="mt-4 d-flex mb-0">
|
|
|
|
{{'groupAccess' | i18n}}
|
|
|
|
<div class="ml-auto" *ngIf="groups && groups.length">
|
|
|
|
<button type="button" (click)="selectAll(true)" class="btn btn-link btn-sm py-0">
|
|
|
|
{{'selectAll' | i18n}}
|
|
|
|
</button>
|
|
|
|
<button type="button" (click)="selectAll(false)" class="btn btn-link btn-sm py-0">
|
|
|
|
{{'unselectAll' | i18n}}
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</h3>
|
|
|
|
<div *ngIf="!groups || !groups.length">
|
|
|
|
{{'noGroupsInList' | i18n}}
|
2018-07-10 16:06:57 +02:00
|
|
|
</div>
|
2018-07-30 14:12:47 +02:00
|
|
|
<table class="table table-hover table-list mb-0" *ngIf="groups && groups.length">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th> </th>
|
|
|
|
<th>{{'name' | i18n}}</th>
|
2020-05-23 11:15:23 +02:00
|
|
|
<th width="100" class="text-center">{{'hidePasswords' | i18n}}</th>
|
2018-07-30 14:12:47 +02:00
|
|
|
<th width="100" class="text-center">{{'readOnly' | i18n}}</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr *ngFor="let g of groups; let i = index">
|
|
|
|
<td class="table-list-checkbox" (click)="check(g)">
|
2019-02-21 22:50:37 +01:00
|
|
|
<input type="checkbox" [(ngModel)]="g.checked" name="Groups[{{i}}].Checked"
|
|
|
|
[disabled]="g.accessAll" appStopProp>
|
2018-07-30 14:12:47 +02:00
|
|
|
</td>
|
|
|
|
<td (click)="check(g)">
|
2018-10-25 04:15:09 +02:00
|
|
|
{{g.name}}
|
2019-10-11 16:35:24 +02:00
|
|
|
<ng-container *ngIf="g.accessAll">
|
|
|
|
<i class="fa fa-th text-muted fa-fw" title="{{'groupAccessAllItems' | i18n}}"
|
|
|
|
aria-hidden="true"></i>
|
|
|
|
<span class="sr-only">{{'groupAccessAllItems' | i18n}}</span>
|
|
|
|
</ng-container>
|
2018-07-30 14:12:47 +02:00
|
|
|
</td>
|
2020-05-23 11:15:23 +02:00
|
|
|
<td class="text-center">
|
|
|
|
<input type="checkbox" [(ngModel)]="g.hidePasswords"
|
|
|
|
name="Groups[{{i}}].HidePasswords" [disabled]="!g.checked || g.accessAll">
|
|
|
|
</td>
|
2018-07-30 14:12:47 +02:00
|
|
|
<td class="text-center">
|
2019-02-21 22:50:37 +01:00
|
|
|
<input type="checkbox" [(ngModel)]="g.readOnly" name="Groups[{{i}}].ReadOnly"
|
|
|
|
[disabled]="!g.checked || g.accessAll">
|
2018-07-30 14:12:47 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</ng-container>
|
2018-07-10 16:06:57 +02:00
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2018-07-18 05:21:23 +02:00
|
|
|
<button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading">
|
2019-10-11 16:35:24 +02:00
|
|
|
<i class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}" aria-hidden="true"></i>
|
2018-07-10 16:06:57 +02:00
|
|
|
<span>{{'save' | i18n}}</span>
|
|
|
|
</button>
|
2019-02-21 22:50:37 +01:00
|
|
|
<button type="button" class="btn btn-outline-secondary"
|
|
|
|
data-dismiss="modal">{{'cancel' | i18n}}</button>
|
2018-07-10 16:06:57 +02:00
|
|
|
<div class="ml-auto">
|
2019-02-21 22:50:37 +01:00
|
|
|
<button #deleteBtn type="button" (click)="delete()" class="btn btn-outline-danger"
|
2019-10-11 16:35:24 +02:00
|
|
|
appA11yTitle="{{'delete' | i18n}}" *ngIf="editMode" [disabled]="deleteBtn.loading"
|
2019-02-21 22:50:37 +01:00
|
|
|
[appApiAction]="deletePromise">
|
2019-10-11 16:35:24 +02:00
|
|
|
<i class="fa fa-trash-o fa-lg fa-fw" [hidden]="deleteBtn.loading" aria-hidden="true"></i>
|
2019-02-21 22:50:37 +01:00
|
|
|
<i class="fa fa-spinner fa-spin fa-lg fa-fw" [hidden]="!deleteBtn.loading"
|
2019-10-11 16:35:24 +02:00
|
|
|
title="{{'loading' | i18n}}" aria-hidden="true"></i>
|
2018-07-10 16:06:57 +02:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|