summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/templates
diff options
context:
space:
mode:
authorJannik Schönartz2017-03-09 00:23:56 +0100
committerJannik Schönartz2017-03-09 00:23:56 +0100
commit326766e9ce7caeaa653cb2bac20962d1147a7e6a (patch)
treefa48f4e8530dc64cabb4a48c04bde9149ba62155 /modules-available/locationinfo/templates
parentfrontend: fixed vertical mode in doorsign (diff)
downloadslx-admin-326766e9ce7caeaa653cb2bac20962d1147a7e6a.tar.gz
slx-admin-326766e9ce7caeaa653cb2bac20962d1147a7e6a.tar.xz
slx-admin-326766e9ce7caeaa653cb2bac20962d1147a7e6a.zip
Locationinfo: Errors from the CourseBackend are now safes in the db and shown in the Admin-Panel. Refresh-button added for the servers. Install.php needs to be executed!
Diffstat (limited to 'modules-available/locationinfo/templates')
-rw-r--r--modules-available/locationinfo/templates/credentials.html2
-rw-r--r--modules-available/locationinfo/templates/location-info.html15
2 files changed, 10 insertions, 7 deletions
diff --git a/modules-available/locationinfo/templates/credentials.html b/modules-available/locationinfo/templates/credentials.html
index 6933db75..70e96982 100644
--- a/modules-available/locationinfo/templates/credentials.html
+++ b/modules-available/locationinfo/templates/credentials.html
@@ -16,7 +16,7 @@
} else if("{{type}}" == "int") {
$("#div").before('<label>{{name}}</label><br><input required type="number" name="{{name}}" value="{{value}}" form="credentialsForm"><br><br>');
} else if("{{type}}" == "bool") {
- $("#div").before('<label>{{name}}</label><br><input required type="checkbox" name="{{name}}" value="{{value}}" form="credentialsForm"><br><br>');
+ $("#div").before('<label>{{name}}</label><br><input type="checkbox" name="{{name}}" value="{{value}}" form="credentialsForm"><br><br>');
} else if("{{type}}" == "array") {
$("#div").before('<label>{{name}}</label><br>\
<select name="{{name}}" form="credentialsForm">\
diff --git a/modules-available/locationinfo/templates/location-info.html b/modules-available/locationinfo/templates/location-info.html
index 65a7a0dc..16318615 100644
--- a/modules-available/locationinfo/templates/location-info.html
+++ b/modules-available/locationinfo/templates/location-info.html
@@ -11,7 +11,7 @@
<th width="90">{{lang_serverType}}</th>
<th>{{lang_locationName}}</th>
<th>{{lang_serverUrl}}</th>
- <th width="80" style="text-align: center;"></th>
+ <th width="130" style="text-align: center;"></th>
<th width="80" style="text-align: center;"></th>
</tr>
{{#serverlist}}
@@ -37,7 +37,8 @@
</td>
<td align="center" id="credentials-{{id}}" onclick="event.cancelBubble = true;">
- <button {{#auth}}class="btn btn-sm btn-success"{{/auth}}{{^auth}}class="btn btn-sm btn-danger"{{/auth}} id="credentials-btn-{{id}}" type="button" title="credentials" onclick="loadCredentialModal({{id}},'{{name}}');" id="credentials">{{lang_credentials}}</button>
+ <button {{#auth}}class="btn btn-sm btn-success"{{/auth}}{{^auth}}class="btn btn-sm btn-danger"{{/auth}} id="credentials-btn-{{id}}" type="button" title="credentials" onclick="loadCredentialModal({{id}},'{{name}}');">{{lang_credentials}}</button>
+ <button class="btn btn-sm btn-primary table-refresh" id="refresh-btn-{{id}}" title="refresh" onclick="refreshButtonClick({{id}});">&#8634</button>
</td>
<td align="center" id="btncell-{{id}}">
<button class="btn btn-sm btn-primary table-edit" title="{{lang_edit}}" onclick="editButtonClick({{id}});" id="edit">&#x270E</button>
@@ -208,16 +209,17 @@ function editButtonClick(id) {
<button class="btn btn-sm btn-danger" title="{{lang_cancel}}" onclick="cancelButtonClick(' + id + ');">&#10008</button>');
$('.table-edit').attr('disabled', true);
$('.table-delete').attr('disabled', true);
+ $('.table-refresh').attr('disabled', true);
$('#addServerButton').attr('disabled', true);
};
function saveButtonClick(id) {
- //$('#input-name-' + id).val($('#lname-' + id).text());
- //$('#input-url-' + id).val($('#lurl-' + id).text());
- //$('#input-user-' + id).val($('#luser-' + id).text());
- //$('#input-password-' + id).val($('#lpassword-' + id).text());
$('#serverFormAction-' + id).val("updateServer");
+ $('#submit-serverForm-' + id).trigger("click");
+};
+function refreshButtonClick(id) {
+ $('#serverFormAction-' + id).val("checkConnection");
$('#submit-serverForm-' + id).trigger("click");
};
@@ -257,6 +259,7 @@ function cancelButtonClick(id) {
<button class="btn btn-sm btn-danger table-delete" type="button" title="{{lang_delete}}" onclick="deleteButtonClick(' + id + ');">&#10008</button>');
$('.table-edit').attr('disabled', false);
$('.table-delete').attr('disabled', false);
+ $('.table-refresh').attr('disabled', false);
$('#addServerButton').attr('disabled', false);
}