1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00
pigallery2/frontend/app/settings/map/map.settings.component.html

51 lines
1.8 KiB
HTML
Raw Normal View History

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