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