BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

privilege-list.twig 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <script type="text/javascript">//<![CDATA[
  2. function reset() {
  3. for (i = 0; i < $('#permissionsform').raw().elements.length; i++) {
  4. element = $('#permissionsform').raw().elements[i];
  5. if (element.id.substr(0, 8) == 'default_') {
  6. $('#' + element.id.substr(8)).raw().checked = element.checked;
  7. }
  8. }
  9. }
  10. //]]>
  11. </script>
  12. <div class="header">
  13. <h2><a href="user.php?id={{ user.id }}" class="username">{{ user.username }}</a> &rsaquo; Permissions</h2>
  14. <div class="linkbox">
  15. <a href="#" onclick="reset(); return false;" class="brackets">Defaults</a>
  16. <a href="tools.php?action=permissions&id={{ user.primaryClass }}" class="brackets">Primary permissions</a>
  17. </div>
  18. </div>
  19. <div class="box pad thin">
  20. <p>Before using permissions, please understand that it allows you to both
  21. grant and revoke access to specific features. If you think that to add access
  22. to a feature, you need to uncheck everything else, <strong>YOU ARE
  23. WRONG</strong>. The check boxes on the left, which are grayed out, are the
  24. standard permissions granted by their class (and donor/artist status). Any
  25. changes you make to the right side will overwrite this.</p>
  26. <p>It's not complicated, and if you screw up, click the "Defaults" link at
  27. the top. It will reset the user to their respective features granted by
  28. class, then you can select or deselect the one or two things you want to
  29. change. <strong>DO NOT DESELECT EVERYTHING.</strong> If you need further
  30. clarification, ask a developer before using this tool.</p>
  31. </div>
  32. <br />
  33. <form class="manage_form" name="permissions" id="permissionsform" method="post" action="">
  34. <input type="hidden" name="action" value="permissions" />
  35. <input type="hidden" name="auth" value="{{ auth }}" />
  36. <input type="hidden" name="id" value="{{ user.id }}" />
  37. {% include 'admin/privilege-list.twig'
  38. with {
  39. 'default': user.defaultPermissionList,
  40. 'user': user.permissionList,
  41. } only
  42. %}
  43. </form>