2017-07-15 23:42:50 +08:00
|
|
|
<form #settingsForm="ngForm" class="form-horizontal">
|
2018-05-14 04:59:57 +08:00
|
|
|
<div class="card mb-4">
|
|
|
|
<h5 class="card-header">
|
|
|
|
<ng-container i18n>Map settings</ng-container>
|
|
|
|
<div class="switch-wrapper">
|
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'"
|
2018-03-30 08:30:23 +08:00
|
|
|
[switch-off-text]="text.Disabled"
|
|
|
|
[switch-on-text]="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 23:29:40 +08:00
|
|
|
[(ngModel)]="settings.enabled">
|
2017-07-14 05:39:09 +08:00
|
|
|
</bSwitch>
|
2017-07-15 18:47:11 +08:00
|
|
|
</div>
|
2018-05-14 04:59:57 +08:00
|
|
|
</h5>
|
|
|
|
<div class="card-body">
|
2017-07-15 18:47:11 +08:00
|
|
|
<div [hidden]="!error" class="alert alert-danger" role="alert"><strong>Error: </strong>{{error}}</div>
|
|
|
|
|
|
|
|
|
2018-05-14 04:59:57 +08:00
|
|
|
<div class="form-group row">
|
|
|
|
<label class="col-md-2 control-label" for="googleApiKey" i18n>Google maps api key</label>
|
|
|
|
<div class="col-md-10">
|
2017-07-15 23:42:50 +08:00
|
|
|
<input type="text" class="form-control" placeholder="Google api key"
|
|
|
|
[(ngModel)]="settings.googleApiKey"
|
|
|
|
[disabled]="!settings.enabled"
|
|
|
|
name="googleApiKey" id="googleApiKey" required>
|
2018-05-14 04:59:57 +08:00
|
|
|
<small class="form-text text-muted">
|
|
|
|
<ng-container i18n>To show the images on a map,</ng-container>
|
|
|
|
<a
|
2017-12-25 07:42:25 +08:00
|
|
|
href="https://developers.google.com/maps/documentation/javascript/get-api-key" i18n>google api key</a> <ng-container
|
2018-05-14 04:59:57 +08:00
|
|
|
i18n>is need
|
|
|
|
</ng-container>
|
|
|
|
</small>
|
2017-07-15 23:42:50 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-14 05:39:09 +08:00
|
|
|
|
2018-05-14 04:59:57 +08:00
|
|
|
<button class="btn btn-success float-right"
|
2017-07-15 18:47:11 +08:00
|
|
|
[disabled]="!settingsForm.form.valid || !changed || inProgress"
|
2017-12-25 07:42:25 +08:00
|
|
|
(click)="save()" i18n>Save
|
2017-07-15 18:47:11 +08:00
|
|
|
</button>
|
2018-05-14 04:59:57 +08:00
|
|
|
<button class="btn btn-default float-right"
|
2017-12-25 07:42:25 +08:00
|
|
|
(click)="reset()" i18n>Reset
|
2017-07-15 18:47:11 +08:00
|
|
|
</button>
|
|
|
|
</div>
|
2017-07-14 05:39:09 +08:00
|
|
|
</div>
|
2017-07-15 18:47:11 +08:00
|
|
|
|
|
|
|
</form>
|