2020-11-04 20:49:08 +01:00
|
|
|
<div class="modal fade" tabindex="-1" 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>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body" *ngIf="send">
|
2021-02-04 20:08:16 +01:00
|
|
|
<app-callout *ngIf="disableSend">
|
|
|
|
<span>{{'sendDisabledWarning' | i18n}}</span>
|
|
|
|
</app-callout>
|
2021-03-29 23:47:45 +02:00
|
|
|
<app-callout *ngIf="!disableSend && disableHideEmail">
|
|
|
|
<span>{{'sendOptionsPolicyInEffect' | i18n}}</span>
|
|
|
|
<ul class="mb-0">
|
|
|
|
<li>{{'sendDisableHideEmailInEffect' | i18n}}</li>
|
|
|
|
</ul>
|
|
|
|
</app-callout>
|
2021-02-25 18:23:52 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-6 form-group">
|
|
|
|
<label for="name">{{'name' | i18n}}</label>
|
|
|
|
<input id="name" class="form-control" type="text" name="Name" [(ngModel)]="send.name" required
|
|
|
|
[readOnly]="disableSend">
|
|
|
|
<small class="form-text text-muted">{{'sendNameDesc' | i18n}}</small>
|
|
|
|
</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">
|
|
|
|
<input class="form-check-input" type="radio" [(ngModel)]="send.type" name="Type_{{o.value}}"
|
|
|
|
id="type_{{o.value}}" [value]="o.value" (change)="typeChanged(o)"
|
|
|
|
[checked]="send.type === o.value">
|
|
|
|
<label class="form-check-label" for="type_{{o.value}}">
|
|
|
|
{{o.name}}
|
|
|
|
</label>
|
|
|
|
</div>
|
2020-11-04 20:49:08 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Text -->
|
|
|
|
<ng-container *ngIf="send.type === sendType.Text">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="text">{{'sendTypeText' | i18n}}</label>
|
2021-02-08 22:07:40 +01:00
|
|
|
<textarea id="text" name="Text.Text" rows="6" [(ngModel)]="send.text.text" class="form-control"
|
|
|
|
[readOnly]="disableSend"></textarea>
|
|
|
|
<small class="form-text text-muted">{{'sendTextDesc' | i18n}}</small>
|
2020-11-04 20:49:08 +01:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="form-check">
|
|
|
|
<input class="form-check-input" type="checkbox" [(ngModel)]="send.text.hidden"
|
2021-02-04 20:08:16 +01:00
|
|
|
id="text-hidden" name="Text.Hidden" [disabled]="disableSend">
|
2021-01-07 23:13:25 +01:00
|
|
|
<label class="form-check-label" for="text-hidden">{{'textHiddenByDefault' | i18n}}</label>
|
2020-11-04 20:49:08 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</ng-container>
|
|
|
|
<!-- File -->
|
|
|
|
<ng-container *ngIf="send.type === sendType.File">
|
|
|
|
<div class="form-group">
|
|
|
|
<div *ngIf="editMode">
|
|
|
|
<strong class="d-block">{{'file' | i18n}}</strong>
|
|
|
|
{{send.file.fileName}} ({{send.file.sizeName}})
|
|
|
|
</div>
|
|
|
|
<div *ngIf="!editMode">
|
|
|
|
<label for="file">{{'file' | i18n}}</label>
|
2021-02-08 22:07:40 +01:00
|
|
|
<input type="file" id="file" class="form-control-file" name="file" required
|
|
|
|
[disabled]="disableSend">
|
|
|
|
<small class="form-text text-muted">{{'sendFileDesc' | i18n}} {{'maxFileSize' |
|
|
|
|
i18n}}</small>
|
2020-11-04 20:49:08 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</ng-container>
|
2021-02-25 18:23:52 +01:00
|
|
|
<h3 class="mt-5">{{'share' | i18n}}</h3>
|
|
|
|
<div class="form-group" *ngIf="link">
|
|
|
|
<label for="link">{{'sendLinkLabel' | i18n}}</label>
|
|
|
|
<input type="text" readonly id="link" name="Link" [(ngModel)]="link" class="form-control">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="form-check">
|
|
|
|
<input class="form-check-input" type="checkbox" [(ngModel)]="copyLink" id="copy-link"
|
|
|
|
name="CopyLink">
|
|
|
|
<label class="form-check-label" for="copy-link">{{'copySendLinkOnSave' | i18n}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="options-header" class="section-header d-flex flex-row align-items-center mt-5"
|
|
|
|
(click)="toggleOptions()">
|
2021-02-24 19:27:07 +01:00
|
|
|
<h3 class="mb-0 mr-2">{{'options' | i18n}}</h3>
|
2021-02-25 18:23:52 +01:00
|
|
|
<a class="mb-1" href="#" appStopClick role="button">
|
|
|
|
<i class="fa" aria-hidden="true"
|
|
|
|
[ngClass]="{'fa-chevron-down': !showOptions, 'fa-chevron-up': showOptions}"></i>
|
2021-02-24 19:27:07 +01:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div id="options" [hidden]="!showOptions">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-6 form-group">
|
|
|
|
<label for="deletionDate">{{'deletionDate' | i18n}}</label>
|
2021-03-02 20:02:15 +01:00
|
|
|
<ng-template #deletionDateCustom>
|
|
|
|
<ng-container *ngIf="isDateTimeLocalSupported">
|
|
|
|
<input id="deletionDateCustom" class="form-control mt-1" type="datetime-local"
|
|
|
|
name="DeletionDate" [(ngModel)]="deletionDate" required
|
|
|
|
placeholder="MM/DD/YYYY HH:MM AM/PM" [readOnly]="disableSend">
|
|
|
|
</ng-container>
|
|
|
|
<div *ngIf="!isDateTimeLocalSupported" class="d-flex justify-content-around">
|
|
|
|
<input id="deletionDateCustomFallback" class="form-control mt-1" type="date"
|
|
|
|
name="DeletionDateFallback" [(ngModel)]="deletionDateFallback" required
|
2021-03-08 22:10:16 +01:00
|
|
|
placeholder="MM/DD/YYYY" [readOnly]="disableSend" data-date-format="mm/dd/yyyy">
|
|
|
|
<select *ngIf="isSafari" id="deletionTimeCustomFallback" class="form-control mt-1 ml-1" [required]="!editMode"
|
|
|
|
[(ngModel)]="safariDeletionTime" name="SafariDeletionTime">
|
|
|
|
<option *ngFor="let o of safariDeletionTimeOptions" [value]="o.military">{{o.standard}}</option>
|
|
|
|
</select>
|
|
|
|
<input *ngIf="!isSafari" id="deletionTimeCustomFallback" class="form-control mt-1 ml-1" type="time"
|
2021-03-02 20:02:15 +01:00
|
|
|
name="DeletionTimeDate" [(ngModel)]="deletionTimeFallback" required
|
|
|
|
placeholder="HH:MM AM/PM" [readOnly]="disableSend">
|
|
|
|
</div>
|
|
|
|
</ng-template>
|
2021-02-24 19:27:07 +01:00
|
|
|
<div *ngIf="!editMode">
|
|
|
|
<select id="deletionDate" name="DeletionDateSelect" [(ngModel)]="deletionDateSelect"
|
|
|
|
class="form-control" required>
|
|
|
|
<option *ngFor="let o of deletionDateOptions" [ngValue]="o.value">{{o.name}}
|
|
|
|
</option>
|
|
|
|
</select>
|
2021-03-02 20:02:15 +01:00
|
|
|
<ng-container *ngIf="deletionDateSelect === 0">
|
|
|
|
<ng-container *ngTemplateOutlet="deletionDateCustom">
|
|
|
|
</ng-container>
|
|
|
|
</ng-container>
|
2021-02-24 19:27:07 +01:00
|
|
|
</div>
|
|
|
|
<div *ngIf="editMode">
|
2021-03-02 20:02:15 +01:00
|
|
|
<ng-container *ngTemplateOutlet="deletionDateCustom">
|
|
|
|
</ng-container>
|
2021-02-24 19:27:07 +01:00
|
|
|
</div>
|
|
|
|
<div class="form-text text-muted small">{{'deletionDateDesc' | i18n}}</div>
|
2021-01-05 20:45:23 +01:00
|
|
|
</div>
|
2021-02-24 19:27:07 +01:00
|
|
|
<div class="col-6 form-group">
|
|
|
|
<div class="d-flex">
|
|
|
|
<label for="expirationDate">{{'expirationDate' | i18n}}</label>
|
2021-02-25 18:23:52 +01:00
|
|
|
<a href="#" appStopClick (click)="clearExpiration()" class="ml-auto"
|
|
|
|
*ngIf="editMode && !disableSend">
|
2021-02-24 19:27:07 +01:00
|
|
|
{{'clear' | i18n}}
|
|
|
|
</a>
|
|
|
|
</div>
|
2021-03-02 20:02:15 +01:00
|
|
|
<ng-template #expirationDateCustom>
|
|
|
|
<ng-container *ngIf="isDateTimeLocalSupported">
|
|
|
|
<input id="expirationDateCustom" class="form-control mt-1" type="datetime-local"
|
2021-03-08 22:10:16 +01:00
|
|
|
name="ExpirationDate" [(ngModel)]="expirationDate" placeholder="MM/DD/YYYY HH:MM AM/PM" [readOnly]="disableSend">
|
2021-03-02 20:02:15 +01:00
|
|
|
</ng-container>
|
|
|
|
<div class="d-flex justify-content-around" *ngIf="!isDateTimeLocalSupported">
|
|
|
|
<input id="expirationDateCustomFallback" class="form-control mt-1" type="date"
|
2021-03-02 23:04:04 +01:00
|
|
|
name="ExpirationDateFallback" [(ngModel)]="expirationDateFallback" [required]="!editMode"
|
2021-03-09 17:00:45 +01:00
|
|
|
placeholder="MM/DD/YYYY" [readOnly]="disableSend" data-date-format="mm/dd/yyyy" (change)="expirationDateFallbackChanged()">
|
2021-03-08 22:10:16 +01:00
|
|
|
<select *ngIf="isSafari" id="expirationTimeCustomFallback" class="form-control mt-1 ml-1" [required]="!editMode"
|
|
|
|
[(ngModel)]="safariExpirationTime" name="SafariExpirationTime">
|
|
|
|
<option *ngFor="let o of safariExpirationTimeOptions" [ngValue]="o.military">{{o.standard}}</option>
|
|
|
|
</select>
|
|
|
|
<input *ngIf="!isSafari" id="expirationTimeCustomFallback" class="form-control mt-1 ml-1" type="time"
|
|
|
|
name="ExpirationTimeFallback" [(ngModel)]="expirationTimeFallback" [required]="!editMode"
|
|
|
|
placeholder="HH:MM AM/PM" [readOnly]="disableSend">
|
2021-03-02 20:02:15 +01:00
|
|
|
</div>
|
|
|
|
</ng-template>
|
2021-02-24 19:27:07 +01:00
|
|
|
<div *ngIf="!editMode">
|
2021-02-25 18:23:52 +01:00
|
|
|
<select id="expirationDate" name="ExpirationDateSelect"
|
|
|
|
[(ngModel)]="expirationDateSelect" class="form-control" required>
|
2021-02-24 19:27:07 +01:00
|
|
|
<option *ngFor="let o of expirationDateOptions" [ngValue]="o.value">{{o.name}}
|
|
|
|
</option>
|
|
|
|
</select>
|
2021-03-02 20:02:15 +01:00
|
|
|
<ng-container *ngIf="expirationDateSelect === 0">
|
|
|
|
<ng-container *ngTemplateOutlet="expirationDateCustom">
|
|
|
|
</ng-container>
|
|
|
|
</ng-container>
|
2021-02-24 19:27:07 +01:00
|
|
|
</div>
|
|
|
|
<div *ngIf="editMode">
|
2021-03-02 20:02:15 +01:00
|
|
|
<ng-container *ngTemplateOutlet="expirationDateCustom">
|
|
|
|
</ng-container>
|
2021-02-24 19:27:07 +01:00
|
|
|
</div>
|
|
|
|
<div class="form-text text-muted small">{{'expirationDateDesc' | i18n}}</div>
|
2021-01-05 20:45:23 +01:00
|
|
|
</div>
|
2020-11-04 20:49:08 +01:00
|
|
|
</div>
|
2021-02-24 19:27:07 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-6 form-group">
|
|
|
|
<label for="maxAccessCount">{{'maxAccessCount' | i18n}}</label>
|
|
|
|
<input id="maxAccessCount" class="form-control" type="number" name="MaxAccessCount"
|
|
|
|
[(ngModel)]="send.maxAccessCount" min="1" [readOnly]="disableSend">
|
|
|
|
<div class="form-text text-muted small">{{'maxAccessCountDesc' | i18n}}</div>
|
2021-01-05 20:45:23 +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-03-01 16:41:46 +01:00
|
|
|
<input id="accessCount" class="form-control" type="text" name="AccessCount" readonly
|
2021-02-24 19:27:07 +01:00
|
|
|
[(ngModel)]="send.accessCount">
|
2021-01-05 20:45:23 +01:00
|
|
|
</div>
|
2020-11-04 20:49:08 +01:00
|
|
|
</div>
|
2021-02-24 19:27:07 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-6 form-group">
|
|
|
|
<label for="password" *ngIf="!hasPassword">{{'password' | i18n}}</label>
|
|
|
|
<label for="password" *ngIf="hasPassword">{{'newPassword' | i18n}}</label>
|
|
|
|
<div class="input-group">
|
|
|
|
<input id="password" class="form-control text-monospace"
|
|
|
|
type="{{showPassword ? 'text' : 'password'}}" name="Password" [(ngModel)]="password"
|
|
|
|
[readOnly]="disableSend">
|
|
|
|
<div class="input-group-append">
|
|
|
|
<button type="button" class="btn btn-outline-secondary"
|
|
|
|
appA11yTitle="{{'toggleVisibility' | i18n}}" (click)="togglePasswordVisible()">
|
|
|
|
<i class="fa fa-lg" aria-hidden="true"
|
|
|
|
[ngClass]="{'fa-eye': !showPassword, 'fa-eye-slash': showPassword}"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
2021-02-05 20:23:40 +01:00
|
|
|
</div>
|
2021-02-24 19:27:07 +01:00
|
|
|
<div class="form-text text-muted small">{{'sendPasswordDesc' | i18n}}</div>
|
2021-02-05 20:23:40 +01:00
|
|
|
</div>
|
2020-11-04 20:49:08 +01:00
|
|
|
</div>
|
2021-02-24 19:27:07 +01:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="notes">{{'notes' | i18n}}</label>
|
|
|
|
<textarea id="notes" name="Notes" rows="6" [(ngModel)]="send.notes" class="form-control"
|
|
|
|
[readOnly]="disableSend"></textarea>
|
|
|
|
<div class="form-text text-muted small">{{'sendNotesDesc' | i18n}}</div>
|
|
|
|
</div>
|
2021-03-29 23:47:45 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<div class="form-check">
|
|
|
|
<input class="form-check-input" type="checkbox" [(ngModel)]="send.hideEmail" id="hideEmail"
|
|
|
|
name="HideEmail" [disabled]="(disableHideEmail && !send.hideEmail) || disableSend">
|
|
|
|
<label class="form-check-label" for="hideEmail">
|
|
|
|
{{'hideEmail' | i18n}}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-02-24 19:27:07 +01:00
|
|
|
<div class="form-group">
|
|
|
|
<div class="form-check">
|
|
|
|
<input class="form-check-input" type="checkbox" [(ngModel)]="send.disabled" id="disabled"
|
|
|
|
name="Disabled" [disabled]="disableSend">
|
|
|
|
<label class="form-check-label" for="disabled">{{'disableThisSend' | i18n}}</label>
|
|
|
|
</div>
|
2020-11-04 20:49:08 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2021-06-02 14:21:57 +02:00
|
|
|
<button type="submit" class="btn btn-primary btn-submit manual" [ngClass]="{loading:form.loading}"
|
|
|
|
[disabled]="form.loading || disableSend">
|
2020-11-04 20:49:08 +01:00
|
|
|
<i class="fa fa-spinner fa-spin" title="{{'loading' | i18n}}" aria-hidden="true"></i>
|
|
|
|
<span>{{'save' | i18n}}</span>
|
|
|
|
</button>
|
|
|
|
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">
|
|
|
|
{{'cancel' | i18n}}
|
|
|
|
</button>
|
|
|
|
<div class="ml-auto" *ngIf="send">
|
|
|
|
<button #deleteBtn type="button" (click)="delete()" class="btn btn-outline-danger"
|
|
|
|
appA11yTitle="{{'delete' | i18n}}" *ngIf="editMode" [disabled]="deleteBtn.loading"
|
|
|
|
[appApiAction]="deletePromise">
|
|
|
|
<i class="fa fa-trash-o fa-lg fa-fw" [hidden]="deleteBtn.loading" aria-hidden="true"></i>
|
|
|
|
<i class="fa fa-spinner fa-spin fa-lg fa-fw" [hidden]="!deleteBtn.loading"
|
|
|
|
title="{{'loading' | i18n}}" aria-hidden="true"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|