mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
74 lines
2.6 KiB
HTML
74 lines
2.6 KiB
HTML
<form #settingsForm="ngForm">
|
|
<div class="panel panel-default"
|
|
[ngClass]="!_settingsService.isSupported()?'panel-warning':''">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title col-sm-4">Search settings</h3>
|
|
<div class="switch-wrapper col-sm-8">
|
|
<bSwitch
|
|
class="switch"
|
|
name="enabled"
|
|
[switch-on-color]="'success'"
|
|
[switch-inverse]="'inverse'"
|
|
[switch-off-text]="'Disabled'"
|
|
[switch-on-text]="'Enabled'"
|
|
[switch-disabled]="inProgress || (!_settingsService.settings.enabled && !_settingsService.isSupported())"
|
|
[switch-handle-width]="'100'"
|
|
[switch-label-width]="'20'"
|
|
[(ngModel)]="_settingsService.settings.enabled">
|
|
</bSwitch>
|
|
</div>
|
|
</div>
|
|
<div class="panel-body">
|
|
<div [hidden]="!error" class="alert alert-danger" role="alert"><strong>Error: </strong>{{error}}</div>
|
|
|
|
<div class="form-group">
|
|
<label class="col-sm-2 control-label" for="autocompleteEnabled">Autocomplete</label>
|
|
<div class="col-sm-10">
|
|
<bSwitch
|
|
id="autocompleteEnabled"
|
|
class="switch"
|
|
name="autocompleteEnabled"
|
|
[switch-on-color]="'primary'"
|
|
[switch-disabled]="!_settingsService.settings.enabled"
|
|
[switch-inverse]="'inverse'"
|
|
[switch-off-text]="'Disabled'"
|
|
[switch-on-text]="'Enabled'"
|
|
[switch-handle-width]="'100'"
|
|
[switch-label-width]="'20'"
|
|
[(ngModel)]="_settingsService.settings.autocompleteEnabled">
|
|
</bSwitch>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
<label class="col-sm-2 control-label" for="instantSearchEnabled">Instant search</label>
|
|
<div class="col-sm-10">
|
|
<bSwitch
|
|
id="instantSearchEnabled"
|
|
class="switch"
|
|
name="instantSearchEnabled"
|
|
[switch-on-color]="'primary'"
|
|
[switch-disabled]="!_settingsService.settings.enabled"
|
|
[switch-inverse]="'inverse'"
|
|
[switch-off-text]="'Disabled'"
|
|
[switch-on-text]="'Enabled'"
|
|
[switch-handle-width]="'100'"
|
|
[switch-label-width]="'20'"
|
|
[(ngModel)]="_settingsService.settings.instantSearchEnabled">
|
|
</bSwitch>
|
|
</div>
|
|
</div>
|
|
|
|
<button class="btn btn-success pull-right"
|
|
[disabled]="!settingsForm.form.valid || !changed || inProgress"
|
|
(click)="save()">Save
|
|
</button>
|
|
<button class="btn btn-default pull-right"
|
|
(click)="reset()">Reset
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|