diff options
author | Simon Rettberg | 2017-04-12 14:14:49 +0200 |
---|---|---|
committer | Simon Rettberg | 2017-04-12 14:14:49 +0200 |
commit | 131218d9034e19be708aca520e5e0aa9937e8ce2 (patch) | |
tree | 3d9d549fa0091a00830ba713cbd1b8e8a9229d7f /modules-available/locationinfo | |
parent | [locationinfo] Format php files (diff) | |
download | slx-admin-131218d9034e19be708aca520e5e0aa9937e8ce2.tar.gz slx-admin-131218d9034e19be708aca520e5e0aa9937e8ce2.tar.xz slx-admin-131218d9034e19be708aca520e5e0aa9937e8ce2.zip |
[locationinfo] Don't hardcode languages
Diffstat (limited to 'modules-available/locationinfo')
-rw-r--r-- | modules-available/locationinfo/page.inc.php | 1 | ||||
-rw-r--r-- | modules-available/locationinfo/templates/config.html | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/modules-available/locationinfo/page.inc.php b/modules-available/locationinfo/page.inc.php index d507c4c3..16b85b11 100644 --- a/modules-available/locationinfo/page.inc.php +++ b/modules-available/locationinfo/page.inc.php @@ -733,6 +733,7 @@ class Page_LocationInfo extends Page echo Render::parse('config', array( 'id' => $id, 'language' => $array['language'], + 'languages' => Dictionary::getLanguages(true), 'mode' => 'mode' . $array['mode'], 'vertical' => $array['vertical'], 'eco' => $array['eco'], diff --git a/modules-available/locationinfo/templates/config.html b/modules-available/locationinfo/templates/config.html index 0fb62a50..104b1cf3 100644 --- a/modules-available/locationinfo/templates/config.html +++ b/modules-available/locationinfo/templates/config.html @@ -61,9 +61,9 @@ <div class="col-md-7"> <select class="form-control" name="language" id="language" onchange="modifyCustomUrl('&language=', this.value);"> - <option value="en" id="en">{{lang_languageEn}}</option> - <option value="de" id="de">{{lang_languageDe}}</option> - <option value="pt" id="pt">{{lang_languagePt}}</option> + {{#languages}} + <option value="{{cc}}" id="lang-{{cc}}">{{name}}</option> + {{/languages}} </select> </div> <div class="col-md-2"> @@ -400,7 +400,7 @@ * Loads the Values in the config form elements. */ function loadValues() { - $("#{{language}}").attr("selected", "selected"); + $("#lang-{{language}}").attr("selected", "selected"); $('#serverOption-{{serverid}}').attr("selected", "selected"); |