2018-06-13 06:03:48 +02:00
|
|
|
<div class="modal fade">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<form class="modal-content" #form (ngSubmit)="submit()" [appApiAction]="formPromise">
|
|
|
|
<div class="modal-header">
|
|
|
|
<h2 class="modal-title">
|
|
|
|
{{'shareSelected' | i18n}}
|
|
|
|
</h2>
|
|
|
|
<button type="button" class="close" data-dismiss="modal" attr.aria-label="{{'close' | i18n}}">
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<p>{{'shareManyDesc' | i18n}}</p>
|
|
|
|
<p>{{'shareSelectedItemsDesc' | i18n: this.ciphers.length : shareableCiphers.length : nonShareableCount}}</p>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="organization">{{'organization' | i18n}}</label>
|
|
|
|
<select id="organization" name="OrganizationId" [(ngModel)]="organizationId" class="form-control" (change)="filterCollections()">
|
|
|
|
<option *ngFor="let o of organizations" [ngValue]="o.id">{{o.name}}</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div class="d-flex">
|
|
|
|
<h3>{{'collections' | i18n}}</h3>
|
2018-07-19 23:17:30 +02:00
|
|
|
<div class="ml-auto d-flex" *ngIf="collections && collections.length">
|
2018-07-18 05:21:23 +02:00
|
|
|
<button type="button" (click)="selectAll(true)" class="btn btn-link btn-sm py-0">
|
2018-06-13 06:03:48 +02:00
|
|
|
{{'selectAll' | i18n}}
|
|
|
|
</button>
|
2018-07-18 05:21:23 +02:00
|
|
|
<button type="button" (click)="selectAll(false)" class="btn btn-link btn-sm py-0">
|
2018-06-13 06:03:48 +02:00
|
|
|
{{'unselectAll' | i18n}}
|
|
|
|
</button>
|
2018-07-19 23:17:30 +02:00
|
|
|
</div>
|
2018-06-13 06:03:48 +02:00
|
|
|
</div>
|
2018-07-19 23:17:30 +02:00
|
|
|
<div *ngIf="!collections || !collections.length">
|
|
|
|
{{'noCollectionsInList' | i18n}}
|
|
|
|
</div>
|
|
|
|
<table class="table table-hover table-list mb-0" *ngIf="collections && collections.length">
|
2018-06-13 06:03:48 +02:00
|
|
|
<tbody>
|
|
|
|
<tr *ngFor="let c of collections; let i = index" (click)="check(c)">
|
|
|
|
<td class="table-list-checkbox">
|
2018-09-24 23:45:35 +02:00
|
|
|
<input type="checkbox" [(ngModel)]="c.checked" name="Collection[{{i}}].Checked" appStopProp>
|
2018-06-13 06:03:48 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
2018-10-25 04:15:09 +02:00
|
|
|
{{c.name}}
|
2018-06-13 06:03:48 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2018-08-08 05:46:31 +02:00
|
|
|
<button type="submit" class="btn btn-primary btn-submit manual" [disabled]="form.loading || !canSave" [ngClass]="{loading:form.loading}">
|
2018-07-18 05:15:15 +02:00
|
|
|
<i class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}"></i>
|
2018-06-21 16:06:32 +02:00
|
|
|
<span>{{'save' | i18n}}</span>
|
2018-06-13 06:03:48 +02:00
|
|
|
</button>
|
|
|
|
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal" title="{{'cancel' | i18n}}">{{'cancel' | i18n}}</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|