diff options
author | Simon Rettberg | 2016-05-03 19:03:09 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-05-03 19:03:09 +0200 |
commit | 50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66 (patch) | |
tree | 05e99fdffa696434960d7c77966c0bc36d6339e8 /modules-available/dozmod/templates/orglist.html | |
parent | Second half of merge.... (diff) | |
download | slx-admin-50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66.tar.gz slx-admin-50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66.tar.xz slx-admin-50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66.zip |
WIP
Diffstat (limited to 'modules-available/dozmod/templates/orglist.html')
-rw-r--r-- | modules-available/dozmod/templates/orglist.html | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/modules-available/dozmod/templates/orglist.html b/modules-available/dozmod/templates/orglist.html new file mode 100644 index 00000000..d325cc4d --- /dev/null +++ b/modules-available/dozmod/templates/orglist.html @@ -0,0 +1,51 @@ +<h2>{{lang_organizationList}}</h2> + +<div class="panel panel-default"> + <div class="panel-heading"> + {{lang_organizationListHeader}} + </div> + <div class="panel-body"> + <div class="table-responsive"> + <table class="table table-stripped table-condensed"> + <thead> + <tr> + <th>{{lang_organization}}</th> + <th><span class="glyphicon glyphicon-ok" title="{{lang_canLogin}}"></span></th> + </tr> + </thead> + <tbody> + {{#organizations}} + <tr> + <td class="text-left slx-nowrap">{{displayname}}</td> + <td><input onclick="seto('setorglogin', this, '{{organizationid}}')" type="checkbox" {{{canlogin}}}></td> + </tr> + {{/organizations}} + </tbody> + </table> + </div> + </div> +</div> + +<script type="text/javascript"><!-- + +function seto(action, el, orgid) { + var box = $(el); + var v = el.checked ? '1' : '0'; + var old = el.checked == true; + box.css('display', 'none'); + $.post('?do=DozMod', { token: TOKEN, action: action, organizationid: orgid, value: v }).done(function (data) { + if (data != 1 && data != 0) { + el.checked = !old; + box.parent().css('background-color', 'red !important'); + } else { + el.checked = (data == 1); + } + box.css('display', ''); + }).fail(function() { + el.checked = !old; + box.parent().css('background-color', 'red !important'); + box.css('display', ''); + }); +} + +--> </script>
\ No newline at end of file |