2018-04-11 19:51:09 +02:00
|
|
|
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise">
|
|
|
|
<header>
|
|
|
|
<div class="left">
|
|
|
|
<button type="button" appBlurClick (click)="back()">
|
|
|
|
<span class="header-icon"><i class="fa fa-chevron-left"></i></span>
|
|
|
|
<span>{{'back' | i18n}}</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="center">
|
|
|
|
<span class="title">{{'attachments' | i18n}}</span>
|
|
|
|
</div>
|
|
|
|
<div class="right">
|
|
|
|
<button type="submit" appBlurClick [disabled]="form.loading">
|
|
|
|
<span [hidden]="form.loading">{{'save' | i18n}}</span>
|
|
|
|
<i class="fa fa-spinner fa-lg fa-spin" [hidden]="!form.loading"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
<content>
|
|
|
|
<div class="box" *ngIf="cipher && cipher.hasAttachments">
|
|
|
|
<div class="box-content no-hover">
|
|
|
|
<div class="box-content-row box-content-row-flex" *ngFor="let a of cipher.attachments">
|
|
|
|
<div class="row-main">
|
|
|
|
{{a.fileName}}
|
|
|
|
</div>
|
|
|
|
<small class="row-sub-label">{{a.sizeName}}</small>
|
|
|
|
<div class="action-buttons no-pad">
|
2018-04-11 19:58:40 +02:00
|
|
|
<button class="row-btn btn" type="button" appStopClick appBlurClick
|
|
|
|
title="{{'deleteAttachment' | i18n}}" (click)="delete(a)" #deleteBtn
|
|
|
|
[appApiAction]="deletePromises[a.id]" [disabled]="deleteBtn.loading">
|
2018-04-11 19:51:09 +02:00
|
|
|
<i class="fa fa-trash-o fa-lg fa-fw" [hidden]="deleteBtn.loading"></i>
|
|
|
|
<i class="fa fa-spinner fa-spin fa-lg fa-fw" [hidden]="!deleteBtn.loading"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="box">
|
|
|
|
<div class="box-header">
|
|
|
|
{{'newAttachment' | i18n}}
|
|
|
|
</div>
|
|
|
|
<div class="box-content no-hover">
|
|
|
|
<div class="box-content-row">
|
|
|
|
<label for="file">{{'file' | i18n}}</label>
|
|
|
|
<input type="file" id="file" name="file" required>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="box-footer">
|
|
|
|
{{'maxFileSize' | i18n}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</content>
|
|
|
|
</form>
|