2017-07-15 22:09:48 +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" i18n>
|
|
|
|
Basic settings
|
|
|
|
</h5>
|
|
|
|
<div class="card-body">
|
2017-07-15 22:09:48 +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" [hidden]="simplifiedMode">
|
|
|
|
<label class="col-md-2 control-label" for="applicationTitle" i18n>Page title</label>
|
|
|
|
<div class="col-md-10">
|
2017-07-15 22:09:48 +08:00
|
|
|
<input type="text" class="form-control" placeholder="Pigallery 2"
|
|
|
|
id="applicationTitle"
|
2017-07-15 23:29:40 +08:00
|
|
|
[(ngModel)]="settings.applicationTitle"
|
2017-07-15 22:09:48 +08:00
|
|
|
name="applicationTitle" required>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-05-14 04:59:57 +08:00
|
|
|
<div class="form-group row" [hidden]="simplifiedMode">
|
|
|
|
<label class="col-md-2 control-label" for="port">Port</label>
|
|
|
|
<div class="col-md-10">
|
2017-07-15 22:09:48 +08:00
|
|
|
<input type="number" class="form-control" placeholder="80"
|
|
|
|
id="port"
|
|
|
|
min="0"
|
|
|
|
step="1"
|
|
|
|
max="65535"
|
2017-07-15 23:29:40 +08:00
|
|
|
[(ngModel)]="settings.port"
|
2017-07-15 22:09:48 +08:00
|
|
|
name="port" required>
|
2018-05-14 04:59:57 +08:00
|
|
|
<small class="form-text text-muted" i18n>Port number. Port 80 is usually what you need.</small>
|
2017-07-15 22:09:48 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-05-14 04:59:57 +08:00
|
|
|
<div class="form-group row">
|
|
|
|
<label class="col-md-2 control-label" for="folder">Images folder</label>
|
|
|
|
<div class="col-md-10">
|
2017-07-15 22:09:48 +08:00
|
|
|
<input type="text" class="form-control" placeholder="path"
|
|
|
|
id="folder"
|
2017-07-15 23:29:40 +08:00
|
|
|
[(ngModel)]="settings.imagesFolder"
|
2017-07-15 22:09:48 +08:00
|
|
|
name="folder" required>
|
2018-05-14 04:59:57 +08:00
|
|
|
<small class="form-text text-muted" i18n>Images are loaded from this folder (read permission required)</small>
|
2017-07-15 22:09:48 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-05-14 04:59:57 +08:00
|
|
|
<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">
|
2017-07-15 22:09:48 +08:00
|
|
|
<input type="url" class="form-control" placeholder="{{urlPlaceholder}}"
|
|
|
|
id="publicUrl"
|
2017-07-15 23:29:40 +08:00
|
|
|
[(ngModel)]="settings.publicUrl"
|
2018-05-18 07:58:14 +08:00
|
|
|
(change)="onUrlChanged()"
|
2017-07-15 22:09:48 +08:00
|
|
|
name="publicUrl">
|
2018-05-14 04:59:57 +08:00
|
|
|
<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>
|
2017-07-15 22:09:48 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-05-14 04:59:57 +08:00
|
|
|
<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">
|
2018-05-13 00:19:51 +08:00
|
|
|
<input type="url" class="form-control" placeholder="/myGallery"
|
|
|
|
id="urlBase"
|
|
|
|
[(ngModel)]="settings.urlBase"
|
2018-05-18 07:58:14 +08:00
|
|
|
(change)="onUrlBaseChanged()"
|
2018-05-13 00:19:51 +08:00
|
|
|
name="urlBase">
|
2018-05-14 04:59:57 +08:00
|
|
|
<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>
|
2018-05-13 00:19:51 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-05-18 07:58:14 +08:00
|
|
|
<div *ngIf="urlError===true" class="alert alert-warning" role="alert" i18n>
|
|
|
|
The public url and the url base are not matching. Some of the functionality might not work.
|
|
|
|
</div>
|
|
|
|
|
2018-05-14 04:59:57 +08:00
|
|
|
<button class="btn btn-success float-right"
|
2017-07-15 22:09:48 +08:00
|
|
|
[disabled]="!settingsForm.form.valid || !changed || inProgress"
|
2017-12-25 07:42:25 +08:00
|
|
|
(click)="save()" i18n>Save
|
2017-07-15 22:09:48 +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 22:09:48 +08:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</form>
|