mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
50 lines
1.8 KiB
HTML
50 lines
1.8 KiB
HTML
<form #settingsForm="ngForm" class="form-horizontal">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title col-xs-4" i18n>Map settings</h3>
|
|
<div class="switch-wrapper col-xs-8">
|
|
<bSwitch
|
|
class="switch"
|
|
name="enabled"
|
|
[switch-on-color]="'success'"
|
|
[switch-inverse]="'inverse'"
|
|
[switch-off-text]="'Disabled'"
|
|
[switch-on-text]="'Enabled'"
|
|
[switch-disabled]="inProgress"
|
|
[switch-handle-width]="'100'"
|
|
[switch-label-width]="'20'"
|
|
[(ngModel)]="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="googleApiKey" i18n>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"><ng-container i18n>To show the images on a map,</ng-container> <a
|
|
href="https://developers.google.com/maps/documentation/javascript/get-api-key" i18n>google api key</a> <ng-container
|
|
i18n>is need</ng-container></span>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<button class="btn btn-success pull-right"
|
|
[disabled]="!settingsForm.form.valid || !changed || inProgress"
|
|
(click)="save()" i18n>Save
|
|
</button>
|
|
<button class="btn btn-default pull-right"
|
|
(click)="reset()" i18n>Reset
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|