summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/templates/server-settings.html
diff options
context:
space:
mode:
authorSimon Rettberg2017-05-08 14:20:27 +0200
committerSimon Rettberg2017-05-08 14:20:27 +0200
commit6d37ffa72f8fdbbeb35430dd326f86be4ef816a3 (patch)
treee4c540aa2455549140d012cc05f3122c095e4f45 /modules-available/locationinfo/templates/server-settings.html
parent[statistics_reporting] Add link to wiki explaining remote reporting in detail (diff)
downloadslx-admin-6d37ffa72f8fdbbeb35430dd326f86be4ef816a3.tar.gz
slx-admin-6d37ffa72f8fdbbeb35430dd326f86be4ef816a3.tar.xz
slx-admin-6d37ffa72f8fdbbeb35430dd326f86be4ef816a3.zip
[locationinfo] Fix initial selection of backend type when creating server
Fixes #3130
Diffstat (limited to 'modules-available/locationinfo/templates/server-settings.html')
-rw-r--r--modules-available/locationinfo/templates/server-settings.html14
1 files changed, 10 insertions, 4 deletions
diff --git a/modules-available/locationinfo/templates/server-settings.html b/modules-available/locationinfo/templates/server-settings.html
index c9b713e6..51e5bff6 100644
--- a/modules-available/locationinfo/templates/server-settings.html
+++ b/modules-available/locationinfo/templates/server-settings.html
@@ -25,6 +25,9 @@
</div>
<div class="col-md-7">
<select class="form-control" onchange="servertype_changed(this.value)">
+ {{#defaultBlank}}
+ <option value="" selected>{{lang_pleaseSelect}}</option>
+ {{/defaultBlank}}
{{#backendList}}
<option value="{{backendtype}}" {{#active}}selected{{/active}}>{{display}}</option>
{{/backendList}}
@@ -75,12 +78,15 @@
if (value === currentBackend)
return;
var newBackend = value;
- console.log('From ' + currentBackend + ' to ' + value);
- $('#formwrapper-' + currentBackend).fadeOut('fast', function() {
- console.log('Fading in ' + newBackend);
+ var fadeIn = function() {
$('#formwrapper-' + newBackend).fadeIn('fast');
$('#myModalSubmitButton, #name-input').attr('form', 'form-' + newBackend);
- });
+ };
+ if (currentBackend) {
+ $('#formwrapper-' + currentBackend).fadeOut('fast', fadeIn);
+ } else {
+ fadeIn();
+ }
currentBackend = value;
}