2017-07-15 21:29:04 +08:00
|
|
|
<form #settingsForm="ngForm">
|
|
|
|
<div class="panel panel-default"
|
2017-07-15 23:29:40 +08:00
|
|
|
[ngClass]="settings.enabled && !_settingsService.isSupported()?'panel-warning':''">
|
2017-07-15 21:29:04 +08:00
|
|
|
<div class="panel-heading">
|
2017-12-25 07:42:25 +08:00
|
|
|
<h3 class="panel-title col-xs-6" i18n>Share settings</h3>
|
2017-07-18 00:30:16 +08:00
|
|
|
<div class="switch-wrapper col-xs-6">
|
2017-07-15 21:29:04 +08:00
|
|
|
<bSwitch
|
|
|
|
class="switch"
|
|
|
|
name="enabled"
|
|
|
|
[switch-on-color]="'success'"
|
|
|
|
[switch-inverse]="'inverse'"
|
2018-03-30 08:30:23 +08:00
|
|
|
[switch-off-text]="text.Disabled"
|
|
|
|
[switch-on-text]="text.Enabled"
|
2017-07-15 23:29:40 +08:00
|
|
|
[switch-disabled]="inProgress || (!settings.enabled && !_settingsService.isSupported())"
|
2017-07-15 21:29:04 +08:00
|
|
|
[switch-handle-width]="'100'"
|
|
|
|
[switch-label-width]="'20'"
|
2017-07-15 23:29:40 +08:00
|
|
|
[(ngModel)]="settings.enabled">
|
2017-07-15 21:29:04 +08:00
|
|
|
</bSwitch>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<div [hidden]="!error" class="alert alert-danger" role="alert"><strong>Error: </strong>{{error}}</div>
|
|
|
|
|
2017-07-15 23:29:40 +08:00
|
|
|
<ng-container *ngIf="settings.enabled || _settingsService.isSupported()">
|
2017-07-15 21:29:04 +08:00
|
|
|
<div class="form-group">
|
2017-12-25 07:42:25 +08:00
|
|
|
<label class="col-sm-2 control-label" for="passwordProtected" i18n>Password protected</label>
|
2017-07-15 21:29:04 +08:00
|
|
|
<div class="col-sm-10">
|
|
|
|
<bSwitch
|
|
|
|
id="passwordProtected"
|
|
|
|
class="switch"
|
|
|
|
name="passwordProtected"
|
|
|
|
[switch-on-color]="'primary'"
|
2017-07-15 23:29:40 +08:00
|
|
|
[switch-disabled]="!settings.enabled"
|
2017-07-15 21:29:04 +08:00
|
|
|
[switch-inverse]="'inverse'"
|
2018-03-30 08:30:23 +08:00
|
|
|
[switch-off-text]="text.Disabled"
|
|
|
|
[switch-on-text]="text.Enabled"
|
2017-07-15 21:29:04 +08:00
|
|
|
[switch-handle-width]="'100'"
|
|
|
|
[switch-label-width]="'20'"
|
2017-07-15 23:29:40 +08:00
|
|
|
[(ngModel)]="settings.passwordProtected">
|
2017-07-15 21:29:04 +08:00
|
|
|
</bSwitch>
|
2017-12-25 07:42:25 +08:00
|
|
|
<span class="help-block" i18n>Enables password protected sharing links</span>
|
2017-07-15 23:42:50 +08:00
|
|
|
|
2017-07-15 21:29:04 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</ng-container>
|
2017-12-25 07:42:25 +08:00
|
|
|
<div class="panel-info" *ngIf="(!settings.enabled && !_settingsService.isSupported())" i18n>
|
2017-07-15 21:29:04 +08:00
|
|
|
Sharing is not supported with these settings
|
|
|
|
</div>
|
|
|
|
<button class="btn btn-success pull-right"
|
|
|
|
[disabled]="!settingsForm.form.valid || !changed || inProgress"
|
2017-12-25 07:42:25 +08:00
|
|
|
(click)="save()" i18n>Save
|
2017-07-15 21:29:04 +08:00
|
|
|
</button>
|
|
|
|
<button class="btn btn-default pull-right"
|
2017-12-25 07:42:25 +08:00
|
|
|
(click)="reset()" i18n>Reset
|
2017-07-15 21:29:04 +08:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|