2017-07-15 17:42:50 +02:00
|
|
|
<form #settingsForm="ngForm" class="form-horizontal">
|
2017-07-15 12:47:11 +02:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
2017-07-17 18:30:16 +02:00
|
|
|
<h3 class="panel-title col-xs-4">Map settings</h3>
|
|
|
|
<div class="switch-wrapper col-xs-8">
|
2017-07-13 23:39:09 +02:00
|
|
|
<bSwitch
|
2017-07-15 12:47:11 +02:00
|
|
|
class="switch"
|
2017-07-13 23:39:09 +02:00
|
|
|
name="enabled"
|
|
|
|
[switch-on-color]="'success'"
|
|
|
|
[switch-inverse]="'inverse'"
|
|
|
|
[switch-off-text]="'Disabled'"
|
|
|
|
[switch-on-text]="'Enabled'"
|
2017-07-15 12:47:11 +02:00
|
|
|
[switch-disabled]="inProgress"
|
2017-07-13 23:39:09 +02:00
|
|
|
[switch-handle-width]="'100'"
|
|
|
|
[switch-label-width]="'20'"
|
2017-07-15 17:29:40 +02:00
|
|
|
[(ngModel)]="settings.enabled">
|
2017-07-13 23:39:09 +02:00
|
|
|
</bSwitch>
|
2017-07-15 12:47:11 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<div [hidden]="!error" class="alert alert-danger" role="alert"><strong>Error: </strong>{{error}}</div>
|
|
|
|
|
|
|
|
|
2017-07-15 17:42:50 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-2 control-label" for="googleApiKey">Google maps api key</label>
|
|
|
|
<div class="col-sm-10">
|
|
|
|
<input type="text" class="form-control" placeholder="Google api key"
|
|
|
|
[(ngModel)]="settings.googleApiKey"
|
|
|
|
[disabled]="!settings.enabled"
|
|
|
|
name="googleApiKey" id="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>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-13 23:39:09 +02:00
|
|
|
|
2017-07-15 12:47:11 +02: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-13 23:39:09 +02:00
|
|
|
</div>
|
2017-07-15 12:47:11 +02:00
|
|
|
|
|
|
|
</form>
|