summaryrefslogtreecommitdiffstats
path: root/modules-available/dozmod/templates
diff options
context:
space:
mode:
authorSimon Rettberg2017-12-15 21:37:08 +0100
committerSimon Rettberg2017-12-15 21:37:08 +0100
commite41a8074713861bdd8c6ef34d4f3465864bf4cd4 (patch)
tree6c62391ce7e1d7944889dc675c0e8ab26cf2dfe6 /modules-available/dozmod/templates
parent[roomplanner] Fix deleting PCs after loading room plan (diff)
parent[backup] added permissions to create and restore backups (diff)
downloadslx-admin-e41a8074713861bdd8c6ef34d4f3465864bf4cd4.tar.gz
slx-admin-e41a8074713861bdd8c6ef34d4f3465864bf4cd4.tar.xz
slx-admin-e41a8074713861bdd8c6ef34d4f3465864bf4cd4.zip
Merge branch 'permission-manager' of openslx.org:openslx-ng/slx-admin into permission-manager
Diffstat (limited to 'modules-available/dozmod/templates')
-rw-r--r--modules-available/dozmod/templates/actionlog-log.html4
-rw-r--r--modules-available/dozmod/templates/images-delete.html2
-rw-r--r--modules-available/dozmod/templates/mailconfig.html4
-rw-r--r--modules-available/dozmod/templates/orglist.html14
-rw-r--r--modules-available/dozmod/templates/runtimeconfig.html2
-rw-r--r--modules-available/dozmod/templates/templates.html4
6 files changed, 21 insertions, 9 deletions
diff --git a/modules-available/dozmod/templates/actionlog-log.html b/modules-available/dozmod/templates/actionlog-log.html
index 09f3a183..8aa57207 100644
--- a/modules-available/dozmod/templates/actionlog-log.html
+++ b/modules-available/dozmod/templates/actionlog-log.html
@@ -18,7 +18,7 @@
{{#showActor}}
<td style="min-width:140px">
{{#uuserid}}
- <a href="?do=dozmod&amp;section=actionlog&amp;action=showuser&amp;uuid={{uuserid}}">{{ulastname}}, {{ufirstname}}</a>
+ {{#allowedShowUser}}<a href="?do=dozmod&amp;section=actionlog&amp;action=showuser&amp;uuid={{uuserid}}">{{/allowedShowUser}} {{ulastname}}, {{ufirstname}}{{#allowedShowUser}}</a>{{/allowedShowUser}}
{{/uuserid}}
{{^uuserid}}
{{lang_system}}
@@ -28,7 +28,7 @@
{{#showTarget}}
<td style="word-wrap: break-word">
{{#targeturl}}
- <a href="{{targeturl}}">{{targetname}}</a>
+ {{#allowedShowTarget}}<a href="{{targeturl}}">{{/allowedShowTarget}}{{targetname}}{{#allowedShowTarget}}</a>{{/allowedShowTarget}}
{{/targeturl}}
{{^targeturl}}
{{targetname}}
diff --git a/modules-available/dozmod/templates/images-delete.html b/modules-available/dozmod/templates/images-delete.html
index dd4c61bc..ed75a0d2 100644
--- a/modules-available/dozmod/templates/images-delete.html
+++ b/modules-available/dozmod/templates/images-delete.html
@@ -45,7 +45,7 @@
{{/images}}
</tbody>
</table>
- <button style="margin-left: 20px" id="delbtn" class="btn btn-danger pull-right" type="submit" name="button" value="save"><span class="glyphicon glyphicon-trash"></span> {{lang_delButton}}</button>
+ <button {{^allowedDelete}}disabled{{/allowedDelete}} style="margin-left: 20px" id="delbtn" class="btn btn-danger pull-right" type="submit" name="button" value="save"><span class="glyphicon glyphicon-trash"></span> {{lang_delButton}}</button>
</form>
<pre style="display:none" id="deloutput"></pre>
</div>
diff --git a/modules-available/dozmod/templates/mailconfig.html b/modules-available/dozmod/templates/mailconfig.html
index 6edc65ae..d5d4db29 100644
--- a/modules-available/dozmod/templates/mailconfig.html
+++ b/modules-available/dozmod/templates/mailconfig.html
@@ -55,10 +55,10 @@
</div>
<br>
<div class="text-right">
- <button class="btn btn-warning" type="button" id="test-button" name="button" value="test" onclick="slxTestConfig()"><span class="glyphicon glyphicon-envelope"></span> {{lang_test}}</button>
+ <button {{^allowedTest}}disabled{{/allowedTest}} class="btn btn-warning" type="button" id="test-button" name="button" value="test" onclick="slxTestConfig()"><span class="glyphicon glyphicon-envelope"></span> {{lang_test}}</button>
<span id="test-spin" style="display:none"><span class="glyphicon glyphicon-refresh slx-rotation"></span></span>
<pre id="test-output" style="display:none"></pre>
- <button class="btn btn-primary" type="submit" name="button" value="save"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button>
+ <button {{^allowedSave}}disabled{{/allowedSave}} class="btn btn-primary" type="submit" name="button" value="save"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button>
<br>
<input type="hidden" name="token" value="{{token}}">
<input type="hidden" name="action" value="mail">
diff --git a/modules-available/dozmod/templates/orglist.html b/modules-available/dozmod/templates/orglist.html
index 361421c5..5224c962 100644
--- a/modules-available/dozmod/templates/orglist.html
+++ b/modules-available/dozmod/templates/orglist.html
@@ -41,7 +41,19 @@ function seto(action, el, orgid) {
if (data !== '1' && data !== '0') {
el.checked = !old;
- box.parent().css('background-color', 'red !important');
+ box.parent().css('background-color', '');
+ /* show success notification */
+ $notification = $('<span></span>')
+ .addClass('glyphicon glyphicon-remove')
+ .css('color', 'red')
+ .css('width', '0px')
+ .css('position', 'relative')
+ .css('right', '20px')
+ .hide();
+ box.before($notification);
+ $notification.fadeIn('fast', function () {
+ $notification.fadeOut('slow', function () { $notification.remove() });
+ });
} else {
el.checked = (data == 1);
box.parent().css('background-color', '');
diff --git a/modules-available/dozmod/templates/runtimeconfig.html b/modules-available/dozmod/templates/runtimeconfig.html
index a1992631..1d4cc6cb 100644
--- a/modules-available/dozmod/templates/runtimeconfig.html
+++ b/modules-available/dozmod/templates/runtimeconfig.html
@@ -117,7 +117,7 @@
<input type="hidden" name="token" value="{{token}}">
<input type="hidden" name="action" value="runtime">
<div class="text-right">
- <button class="btn btn-primary" type="submit" name="button" value="save"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button>
+ <button {{^allowedSave}}disabled{{/allowedSave}} class="btn btn-primary" type="submit" name="button" value="save"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button>
</div>
</form>
</div>
diff --git a/modules-available/dozmod/templates/templates.html b/modules-available/dozmod/templates/templates.html
index 4764c0e9..3ee0ccbc 100644
--- a/modules-available/dozmod/templates/templates.html
+++ b/modules-available/dozmod/templates/templates.html
@@ -80,12 +80,12 @@
{{/templates}}
</div>
- <button type="submit" onclick="return validateForm()" class="btn btn-primary pull-right"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button>
+ <button {{^allowedSave}}disabled{{/allowedSave}} type="submit" onclick="return validateForm()" class="btn btn-primary pull-right"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button>
</form>
<form method="POST" action="?do=dozmod&amp;section=templates">
<input type="hidden" name="token" value="{{token}}">
<div>
- <button type="button" data-toggle="modal" data-target="#resetTemplatesModal" class="btn btn-danger">{{lang_loadDefaults}}</button>
+ <button {{^allowedReset}}disabled{{/allowedReset}} type="button" data-toggle="modal" data-target="#resetTemplatesModal" class="btn btn-danger">{{lang_loadDefaults}}</button>
</div>
<div id="resetTemplatesModal" class="modal fade" role="dialog">