2021-10-21 23:30:25 +02:00
|
|
|
<div class="modal fade" role="dialog" aria-modal="true" aria-labelledby="sendAddEditTitle">
|
2021-05-14 21:03:45 +02:00
|
|
|
<div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
|
2020-11-04 20:49:08 +01:00
|
|
|
<form
|
|
|
|
class="modal-content"
|
|
|
|
#form
|
|
|
|
(ngSubmit)="submit()"
|
|
|
|
[appApiAction]="formPromise"
|
|
|
|
ngNativeValidate
|
|
|
|
autocomplete="off"
|
|
|
|
>
|
|
|
|
<div class="modal-header">
|
|
|
|
<h2 class="modal-title" id="sendAddEditTitle">{{ title }}</h2>
|
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="close"
|
|
|
|
data-dismiss="modal"
|
|
|
|
appA11yTitle="{{ 'close' | i18n }}"
|
|
|
|
>
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2020-11-04 20:49:08 +01:00
|
|
|
<div class="modal-body" *ngIf="send">
|
2021-02-04 20:08:16 +01:00
|
|
|
<app-callout *ngIf="disableSend">
|
|
|
|
<span>{{ "sendDisabledWarning" | i18n }}</span>
|
2021-03-29 23:47:45 +02:00
|
|
|
</app-callout>
|
|
|
|
<app-callout *ngIf="!disableSend && disableHideEmail">
|
|
|
|
<span>{{ "sendOptionsPolicyInEffect" | i18n }}</span>
|
|
|
|
<ul class="mb-0">
|
|
|
|
<li>{{ "sendDisableHideEmailInEffect" | i18n }}</li>
|
2021-12-17 15:57:11 +01:00
|
|
|
</ul>
|
2021-03-29 23:47:45 +02:00
|
|
|
</app-callout>
|
2020-11-04 20:49:08 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-6 form-group">
|
2021-02-25 18:23:52 +01:00
|
|
|
<label for="name">{{ "name" | i18n }}</label>
|
2021-12-17 15:57:11 +01:00
|
|
|
<input
|
2021-02-25 18:23:52 +01:00
|
|
|
id="name"
|
2021-02-08 22:07:40 +01:00
|
|
|
class="form-control"
|
2021-02-25 18:23:52 +01:00
|
|
|
type="text"
|
|
|
|
name="Name"
|
|
|
|
[(ngModel)]="send.name"
|
2021-12-17 15:57:11 +01:00
|
|
|
required
|
2021-02-24 19:27:07 +01:00
|
|
|
[readOnly]="disableSend"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
2021-02-25 18:23:52 +01:00
|
|
|
<small class="form-text text-muted">{{ "sendNameDesc" | i18n }}</small>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-11-04 20:49:08 +01:00
|
|
|
<div class="row" *ngIf="!editMode">
|
|
|
|
<div class="col-6 form-group">
|
2021-02-08 22:07:40 +01:00
|
|
|
<label>{{ "whatTypeOfSend" | i18n }}</label>
|
|
|
|
<div class="form-check" *ngFor="let o of typeOptions">
|
2021-12-17 15:57:11 +01:00
|
|
|
<input
|
2020-11-04 20:49:08 +01:00
|
|
|
class="form-check-input"
|
2021-02-08 22:07:40 +01:00
|
|
|
type="radio"
|
|
|
|
[(ngModel)]="send.type"
|
|
|
|
name="Type_{{ o.value }}"
|
|
|
|
id="type_{{ o.value }}"
|
|
|
|
[value]="o.value"
|
|
|
|
(change)="typeChanged(o)"
|
|
|
|
[checked]="send.type === o.value"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
2021-02-08 22:07:40 +01:00
|
|
|
<label class="form-check-label" for="type_{{ o.value }}">
|
2021-12-17 15:57:11 +01:00
|
|
|
{{ o.name }}
|
|
|
|
</label>
|
2020-11-04 20:49:08 +01:00
|
|
|
</div>
|
2021-02-04 20:08:16 +01:00
|
|
|
</div>
|
2021-03-29 23:47:45 +02:00
|
|
|
</div>
|
2021-02-25 18:23:52 +01:00
|
|
|
<!-- Text -->
|
|
|
|
<ng-container *ngIf="send.type === sendType.Text">
|
2020-11-04 20:49:08 +01:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="text">{{ "sendTypeText" | i18n }}</label>
|
2021-02-08 22:07:40 +01:00
|
|
|
<textarea
|
|
|
|
id="text"
|
|
|
|
name="Text.Text"
|
2020-11-04 20:49:08 +01:00
|
|
|
rows="6"
|
|
|
|
[(ngModel)]="send.text.text"
|
2021-02-25 18:23:52 +01:00
|
|
|
class="form-control"
|
|
|
|
[readOnly]="disableSend"
|
|
|
|
></textarea>
|
|
|
|
<small class="form-text text-muted">{{ "sendTextDesc" | i18n }}</small>
|
|
|
|
</div>
|
2021-02-24 19:27:07 +01:00
|
|
|
<div class="form-group">
|
|
|
|
<div class="form-check">
|
2021-03-01 16:41:46 +01:00
|
|
|
<input
|
|
|
|
class="form-check-input"
|
|
|
|
type="checkbox"
|
2021-02-24 19:27:07 +01:00
|
|
|
[(ngModel)]="send.text.hidden"
|
|
|
|
id="text-hidden"
|
|
|
|
name="Text.Hidden"
|
2021-03-29 23:47:45 +02:00
|
|
|
[disabled]="disableSend"
|
|
|
|
/>
|
2021-02-24 19:27:07 +01:00
|
|
|
<label class="form-check-label" for="text-hidden">{{
|
|
|
|
"textHiddenByDefault" | i18n
|
|
|
|
}}</label>
|
2020-11-04 20:49:08 +01:00
|
|
|
</div>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2020-11-04 20:49:08 +01:00
|
|
|
</ng-container>
|
|
|
|
<!-- File -->
|
|
|
|
<ng-container *ngIf="send.type === sendType.File">
|
|
|
|
<div class="form-group">
|
2021-06-02 14:21:57 +02:00
|
|
|
<div *ngIf="editMode">
|
|
|
|
<strong class="d-block">{{ "file" | i18n }}</strong>
|
2020-11-04 20:49:08 +01:00
|
|
|
{{ send.file.fileName }} ({{ send.file.sizeName }})
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2021-06-02 14:21:57 +02:00
|
|
|
<div *ngIf="!editMode">
|
|
|
|
<label for="file">{{ "file" | i18n }}</label>
|
|
|
|
<input
|
|
|
|
type="file"
|
2021-02-08 22:07:40 +01:00
|
|
|
id="file"
|
2021-06-02 14:21:57 +02:00
|
|
|
class="form-control-file"
|
|
|
|
name="file"
|
2021-12-17 15:57:11 +01:00
|
|
|
required
|
2021-06-02 14:21:57 +02:00
|
|
|
[disabled]="disableSend"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
2021-02-08 22:07:40 +01:00
|
|
|
<small class="form-text text-muted"
|
2021-06-02 14:21:57 +02:00
|
|
|
>{{ "sendFileDesc" | i18n }} {{ "maxFileSize" | i18n }}</small
|
2021-12-17 15:57:11 +01:00
|
|
|
>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-11-04 20:49:08 +01:00
|
|
|
</ng-container>
|
2021-02-25 18:23:52 +01:00
|
|
|
<h3 class="mt-5">{{ "share" | i18n }}</h3>
|
2021-06-02 14:21:57 +02:00
|
|
|
<div class="form-group" *ngIf="link">
|
2020-11-04 20:49:08 +01:00
|
|
|
<label for="link">{{ "sendLinkLabel" | i18n }}</label>
|
|
|
|
<input
|
|
|
|
type="text"
|
2021-12-17 15:57:11 +01:00
|
|
|
readonly
|
2021-02-25 18:23:52 +01:00
|
|
|
id="link"
|
|
|
|
name="Link"
|
2020-11-04 20:49:08 +01:00
|
|
|
[(ngModel)]="link"
|
2021-02-24 19:27:07 +01:00
|
|
|
class="form-control"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
|
|
|
</div>
|
2020-11-04 20:49:08 +01:00
|
|
|
<div class="form-group">
|
2021-03-29 23:47:45 +02:00
|
|
|
<div class="form-check">
|
2021-12-17 15:57:11 +01:00
|
|
|
<input
|
2021-03-29 23:47:45 +02:00
|
|
|
class="form-check-input"
|
|
|
|
type="checkbox"
|
2021-02-25 18:23:52 +01:00
|
|
|
[(ngModel)]="copyLink"
|
|
|
|
id="copy-link"
|
|
|
|
name="CopyLink"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
2021-01-07 23:13:25 +01:00
|
|
|
<label class="form-check-label" for="copy-link">{{
|
2021-02-25 18:23:52 +01:00
|
|
|
"copySendLinkOnSave" | i18n
|
2021-02-24 19:27:07 +01:00
|
|
|
}}</label>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
2021-02-25 18:23:52 +01:00
|
|
|
id="options-header"
|
2020-11-04 20:49:08 +01:00
|
|
|
class="section-header d-flex flex-row align-items-center mt-5"
|
2021-02-25 18:23:52 +01:00
|
|
|
(click)="toggleOptions()"
|
2021-12-17 15:57:11 +01:00
|
|
|
>
|
2020-11-04 20:49:08 +01:00
|
|
|
<h3 class="mb-0 mr-2">{{ "options" | i18n }}</h3>
|
|
|
|
<a class="mb-1" href="#" appStopClick role="button">
|
|
|
|
<i
|
2022-01-27 18:25:58 +01:00
|
|
|
class="bwi"
|
2020-11-04 20:49:08 +01:00
|
|
|
aria-hidden="true"
|
2022-01-27 18:25:58 +01:00
|
|
|
[ngClass]="{ 'bwi-angle-down': !showOptions, 'bwi-chevron-up': showOptions }"
|
2020-11-04 20:49:08 +01:00
|
|
|
></i>
|
2021-12-17 15:57:11 +01:00
|
|
|
</a>
|
|
|
|
</div>
|
2021-02-24 19:27:07 +01:00
|
|
|
<div id="options" [hidden]="!showOptions">
|
2020-11-04 20:49:08 +01:00
|
|
|
<app-send-efflux-dates
|
2021-07-16 20:31:35 +02:00
|
|
|
[initialDeletionDate]="send.deletionDate"
|
2020-11-04 20:49:08 +01:00
|
|
|
[initialExpirationDate]="send.expirationDate"
|
2021-07-16 20:31:35 +02:00
|
|
|
[editMode]="editMode"
|
2020-11-04 20:49:08 +01:00
|
|
|
[disabled]="disableSend"
|
|
|
|
(datesChanged)="setDates($event)"
|
2021-12-17 15:57:11 +01:00
|
|
|
>
|
2021-07-16 20:31:35 +02:00
|
|
|
</app-send-efflux-dates>
|
2021-02-24 19:27:07 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-6 form-group">
|
|
|
|
<label for="maxAccessCount">{{ "maxAccessCount" | i18n }}</label>
|
2021-12-17 15:57:11 +01:00
|
|
|
<input
|
2021-02-24 19:27:07 +01:00
|
|
|
id="maxAccessCount"
|
|
|
|
class="form-control"
|
|
|
|
type="number"
|
|
|
|
name="MaxAccessCount"
|
|
|
|
[(ngModel)]="send.maxAccessCount"
|
2021-12-17 15:57:11 +01:00
|
|
|
min="1"
|
2021-02-24 19:27:07 +01:00
|
|
|
[readOnly]="disableSend"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
2021-02-24 19:27:07 +01:00
|
|
|
<div class="form-text text-muted small">{{ "maxAccessCountDesc" | i18n }}</div>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2021-02-24 19:27:07 +01:00
|
|
|
<div class="col-6 form-group" *ngIf="editMode">
|
|
|
|
<label for="accessCount">{{ "currentAccessCount" | i18n }}</label>
|
2021-12-17 15:57:11 +01:00
|
|
|
<input
|
2021-03-01 16:41:46 +01:00
|
|
|
id="accessCount"
|
2021-02-24 19:27:07 +01:00
|
|
|
class="form-control"
|
|
|
|
type="text"
|
2021-03-01 16:41:46 +01:00
|
|
|
name="AccessCount"
|
2021-12-17 15:57:11 +01:00
|
|
|
readonly
|
2021-02-24 19:27:07 +01:00
|
|
|
[(ngModel)]="send.accessCount"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-02-24 19:27:07 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-6 form-group">
|
2020-11-04 20:49:08 +01:00
|
|
|
<label for="password" *ngIf="!hasPassword">{{ "password" | i18n }}</label>
|
|
|
|
<label for="password" *ngIf="hasPassword">{{ "newPassword" | i18n }}</label>
|
|
|
|
<div class="input-group">
|
2021-12-17 15:57:11 +01:00
|
|
|
<input
|
2021-02-24 19:27:07 +01:00
|
|
|
id="password"
|
|
|
|
class="form-control text-monospace"
|
|
|
|
type="{{ showPassword ? 'text' : 'password' }}"
|
|
|
|
name="Password"
|
2020-11-04 20:49:08 +01:00
|
|
|
[(ngModel)]="password"
|
|
|
|
[readOnly]="disableSend"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
2021-02-24 19:27:07 +01:00
|
|
|
<div class="input-group-append">
|
2020-11-04 20:49:08 +01:00
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="btn btn-outline-secondary"
|
|
|
|
appA11yTitle="{{ 'toggleVisibility' | i18n }}"
|
|
|
|
(click)="togglePasswordVisible()"
|
|
|
|
>
|
|
|
|
<i
|
2022-01-27 18:25:58 +01:00
|
|
|
class="bwi bwi-lg"
|
2020-11-04 20:49:08 +01:00
|
|
|
aria-hidden="true"
|
2022-01-27 18:25:58 +01:00
|
|
|
[ngClass]="{ 'bwi-eye': !showPassword, 'bwi-eye-slash': showPassword }"
|
2020-11-04 20:49:08 +01:00
|
|
|
></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2021-02-24 19:27:07 +01:00
|
|
|
<div class="form-text text-muted small">{{ "sendPasswordDesc" | i18n }}</div>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-02-24 19:27:07 +01:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="notes">{{ "notes" | i18n }}</label>
|
2021-12-17 15:57:11 +01:00
|
|
|
<textarea
|
2021-02-24 19:27:07 +01:00
|
|
|
id="notes"
|
2021-12-17 15:57:11 +01:00
|
|
|
name="Notes"
|
|
|
|
rows="6"
|
2021-02-24 19:27:07 +01:00
|
|
|
[(ngModel)]="send.notes"
|
|
|
|
class="form-control"
|
|
|
|
[readOnly]="disableSend"
|
|
|
|
></textarea>
|
|
|
|
<div class="form-text text-muted small">{{ "sendNotesDesc" | i18n }}</div>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
2021-02-24 19:27:07 +01:00
|
|
|
<div class="form-group">
|
|
|
|
<div class="form-check">
|
2021-12-17 15:57:11 +01:00
|
|
|
<input
|
2021-02-24 19:27:07 +01:00
|
|
|
class="form-check-input"
|
|
|
|
type="checkbox"
|
2021-03-29 23:47:45 +02:00
|
|
|
[(ngModel)]="send.hideEmail"
|
|
|
|
id="hideEmail"
|
|
|
|
name="HideEmail"
|
|
|
|
[disabled]="(disableHideEmail && !send.hideEmail) || disableSend"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
2021-03-29 23:47:45 +02:00
|
|
|
<label class="form-check-label" for="hideEmail">
|
|
|
|
{{ "hideEmail" | i18n }}
|
2021-12-17 15:57:11 +01:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-02-24 19:27:07 +01:00
|
|
|
<div class="form-group">
|
|
|
|
<div class="form-check">
|
2021-12-17 15:57:11 +01:00
|
|
|
<input
|
2021-02-24 19:27:07 +01:00
|
|
|
class="form-check-input"
|
|
|
|
type="checkbox"
|
|
|
|
[(ngModel)]="send.disabled"
|
|
|
|
id="disabled"
|
|
|
|
name="Disabled"
|
|
|
|
[disabled]="disableSend"
|
2021-12-17 15:57:11 +01:00
|
|
|
/>
|
2021-01-07 23:13:25 +01:00
|
|
|
<label class="form-check-label" for="disabled">{{ "disableThisSend" | i18n }}</label>
|
2020-11-04 20:49:08 +01:00
|
|
|
</div>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-11-04 20:49:08 +01:00
|
|
|
<div class="modal-footer">
|
2021-12-17 15:57:11 +01:00
|
|
|
<button
|
|
|
|
type="submit"
|
2021-06-02 14:21:57 +02:00
|
|
|
class="btn btn-primary btn-submit manual"
|
2021-02-08 22:07:40 +01:00
|
|
|
[ngClass]="{ loading: form.loading }"
|
2021-02-24 19:27:07 +01:00
|
|
|
[disabled]="form.loading || disableSend"
|
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>
|
2021-03-29 23:47:45 +02:00
|
|
|
<span>{{ "save" | i18n }}</span>
|
2020-11-04 20:49:08 +01:00
|
|
|
</button>
|
2021-02-24 19:27:07 +01:00
|
|
|
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">
|
2020-11-04 20:49:08 +01:00
|
|
|
{{ "cancel" | i18n }}
|
|
|
|
</button>
|
|
|
|
<div class="ml-auto" *ngIf="send">
|
2021-12-17 15:57:11 +01:00
|
|
|
<button
|
2020-11-04 20:49:08 +01:00
|
|
|
#deleteBtn
|
|
|
|
type="button"
|
|
|
|
(click)="delete()"
|
|
|
|
class="btn btn-outline-danger"
|
2021-02-24 19:27:07 +01:00
|
|
|
appA11yTitle="{{ 'delete' | i18n }}"
|
|
|
|
*ngIf="editMode"
|
2020-11-04 20:49:08 +01:00
|
|
|
[disabled]="deleteBtn.loading"
|
|
|
|
[appApiAction]="deletePromise"
|
2021-12-17 15:57:11 +01:00
|
|
|
>
|
|
|
|
<i
|
2022-01-27 18:25:58 +01:00
|
|
|
class="bwi bwi-trash bwi-lg bwi-fw"
|
2020-11-04 20:49:08 +01:00
|
|
|
[hidden]="deleteBtn.loading"
|
2021-02-25 18:23:52 +01:00
|
|
|
aria-hidden="true"
|
2021-12-17 15:57:11 +01:00
|
|
|
></i>
|
|
|
|
<i
|
2022-01-27 18:25:58 +01:00
|
|
|
class="bwi bwi-spinner bwi-spin bwi-lg bwi-fw"
|
2020-11-04 20:49:08 +01:00
|
|
|
[hidden]="!deleteBtn.loading"
|
|
|
|
title="{{ 'loading' | i18n }}"
|
2021-02-25 18:23:52 +01:00
|
|
|
aria-hidden="true"
|
2021-12-17 15:57:11 +01:00
|
|
|
></i>
|
2020-11-04 20:49:08 +01:00
|
|
|
</button>
|
2021-12-17 15:57:11 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-11-04 20:49:08 +01:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|