1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/frontend/app/settings/basic/basic.settings.component.html
2018-05-13 16:59:57 -04:00

83 lines
3.3 KiB
HTML

<form #settingsForm="ngForm" class="form-horizontal">
<div class="card mb-4">
<h5 class="card-header" i18n>
Basic settings
</h5>
<div class="card-body">
<div [hidden]="!error" class="alert alert-danger" role="alert"><strong>Error: </strong>{{error}}</div>
<div class="form-group row" [hidden]="simplifiedMode">
<label class="col-md-2 control-label" for="applicationTitle" i18n>Page title</label>
<div class="col-md-10">
<input type="text" class="form-control" placeholder="Pigallery 2"
id="applicationTitle"
[(ngModel)]="settings.applicationTitle"
name="applicationTitle" required>
</div>
</div>
<div class="form-group row" [hidden]="simplifiedMode">
<label class="col-md-2 control-label" for="port">Port</label>
<div class="col-md-10">
<input type="number" class="form-control" placeholder="80"
id="port"
min="0"
step="1"
max="65535"
[(ngModel)]="settings.port"
name="port" required>
<small class="form-text text-muted" i18n>Port number. Port 80 is usually what you need.</small>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 control-label" for="folder">Images folder</label>
<div class="col-md-10">
<input type="text" class="form-control" placeholder="path"
id="folder"
[(ngModel)]="settings.imagesFolder"
name="folder" required>
<small class="form-text text-muted" i18n>Images are loaded from this folder (read permission required)</small>
</div>
</div>
<div class="form-group row" [hidden]="simplifiedMode">
<label class="col-md-2 control-label" for="publicUrl" i18n>Page public url</label>
<div class="col-md-10">
<input type="url" class="form-control" placeholder="{{urlPlaceholder}}"
id="publicUrl"
[(ngModel)]="settings.publicUrl"
name="publicUrl">
<small class="form-text text-muted" i18n>If you access the page form local network its good to know the public
url for creating sharing link
</small>
</div>
</div>
<div class="form-group row" [hidden]="simplifiedMode">
<label class="col-md-2 control-label" for="urlBase" i18n>Url Base</label>
<div class="col-md-10">
<input type="url" class="form-control" placeholder="/myGallery"
id="urlBase"
[(ngModel)]="settings.urlBase"
name="urlBase">
<small class="form-text text-muted" i18n>If you access the gallery under a sub url (like:
http://mydomain.com/myGallery), set it here. If not working you might miss the '/' from the beginning of the
url.
</small>
</div>
</div>
<button class="btn btn-success float-right"
[disabled]="!settingsForm.form.valid || !changed || inProgress"
(click)="save()" i18n>Save
</button>
<button class="btn btn-default float-right"
(click)="reset()" i18n>Reset
</button>
</div>
</div>
</form>