1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/frontend/app/settings/map/map.settings.component.html

42 lines
1.5 KiB
HTML
Raw Normal View History

2017-07-15 18:47:11 +08:00
<form #settingsForm="ngForm">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title col-sm-4">Map settings</h3>
<div class="switch-wrapper col-sm-8">
2017-07-14 05:39:09 +08:00
<bSwitch
2017-07-15 18:47:11 +08:00
class="switch"
2017-07-14 05:39:09 +08:00
name="enabled"
[switch-on-color]="'success'"
[switch-inverse]="'inverse'"
[switch-off-text]="'Disabled'"
[switch-on-text]="'Enabled'"
2017-07-15 18:47:11 +08:00
[switch-disabled]="inProgress"
2017-07-14 05:39:09 +08:00
[switch-handle-width]="'100'"
[switch-label-width]="'20'"
2017-07-15 20:27:12 +08:00
[(ngModel)]="_settingsService.settings.enabled">
2017-07-14 05:39:09 +08:00
</bSwitch>
2017-07-15 18:47:11 +08:00
</div>
</div>
<div class="panel-body">
<div [hidden]="!error" class="alert alert-danger" role="alert"><strong>Error: </strong>{{error}}</div>
2017-07-14 05:39:09 +08:00
<input type="text" class="form-control" placeholder="Google api key" autofocus
2017-07-15 20:27:12 +08:00
[(ngModel)]="_settingsService.settings.googleApiKey"
[disabled]="!_settingsService.settings.enabled"
2017-07-14 05:39:09 +08:00
name="googleApiKey" required>
<span class="help-block">To show the images on a map, <a
href="https://developers.google.com/maps/documentation/javascript/get-api-key">google api key</a> is need</span>
2017-07-15 18:47:11 +08:00
<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>
2017-07-14 05:39:09 +08:00
</div>
2017-07-15 18:47:11 +08:00
</form>