<script type="text/javascript">

function validateModuleSelected()
{
    if(document.getElementById("module").value == 0){
        return false;
    }
    location.href='index.php?fuse=admin&view=ViewGeneralGroups&module='+document.getElementById("module").value+'&group='+ document.groupForm.groupId.value;
}

</script>

<ul class="tabs">
    <li><a href="index.php?fuse=admin&amp;view=ViewAdminList">[l]Staff Management[/l]</a></li>
    <li class="active"><a href="index.php?fuse=admin&view=ViewGeneralGroups">[l]Roles[/l]</a></li>
    <!-- BEGIN DYNAMIC BLOCK: accountsStuff -->
    <li><a href="index.php?fuse=admin&view=ViewCustomerGroups">[l]Customer Groups[/l]</a></li>
    <li><a href="index.php?fuse=admin&view=ShowCustomFields">[l]Custom Fields[/l]</a></li>
    <!-- END DYNAMIC BLOCK: accountsStuff -->
</ul>

<div id="profile_topcontent" style="padding-bottom:10px;">
    <div class="linkbackbanner" style="width:180px">
	<a href="index.php?fuse=admin&view=ViewGeneralGroups"><strong>← [l]Back[/l]</strong><em>[l]Roles[/l]</em></a>
    </div>
</div>

<div class="table-summary" style="">
<h2 style="text-transform:capitalize;">{groupName} : {selectedmodulename} [l]Module[/l] [l]Permissions[/l]</h2>
[l]In order to delete an access group you have to assign its members to another group.[/l]&nbsp;&nbsp;
<!-- BEGIN DYNAMIC BLOCK: notice -->
[l]The "Customer" and "Super Admin" groups can't be deleted.[/l]
<!-- END DYNAMIC BLOCK: notice -->
</div>

    <form name="groupForm" method="post" action="index.php?fuse=admin&action=Admin_SaveGeneralGroupPermissions" />
    <input type="hidden" name="groupId" value="{groupId}" />
    <input type="hidden" name="module" value="{module}" />

    <!--
        <!-- BEGIN DYNAMIC BLOCK: staffMembers -->
            [l]Staff members[/l]
                <ul>
                    <!-- BEGIN DYNAMIC BLOCK: rowstaff -->
                    <li>{STAFFNAME}</li>
                    <!-- END DYNAMIC BLOCK: rowstaff -->
                </ul>
                <!-- BEGIN DYNAMIC BLOCK: noStaff -->
                [l]There are no staff members belonging to this group.[/l]
                <!-- END DYNAMIC BLOCK: noStaff -->
        <!-- END DYNAMIC BLOCK: staffMembers -->
    -->

    <!-- BEGIN DYNAMIC BLOCK: permissionsSection -->
    <div id="vtabsBar">
        <!-- BEGIN DYNAMIC BLOCK: modulespackage -->
        <a href="index.php?fuse=admin&amp;view=admin&amp;view=AddEditGeneralGroup&amp;module={MODULENAME}&amp;group={groupId}" ><div class="vtab {moduleActive}">{MODULENAMETRANSLATION}</div></a>
        <!-- END DYNAMIC BLOCK: modulespackage -->
    </div>
    <div id="vtabContent" style="padding-left:0px;">
        <table border="0">
                    <tr valign="top">
                        <td style="margin-left: 20px;padding-top: 20px;">
                            <!-- BEGIN DYNAMIC BLOCK: permissionsGroup -->
                            <div id="div_{PERMISSIONNAME}_main" style="{DIVDISPLAY}margin-left:25px" >
                                <div id="div_{PERMISSIONNAME}" style="clear:left;padding-bottom:6px">
                                    <input type="checkbox" name="permissions[]" value="{PERMISSIONNAME}" id="{PERMISSIONNAME}" onclick = "changeCheckBox(this, 'div_{PERMISSIONNAME}', 'div_{PERMISSIONNAME}_main')" {DISABLED} align=left  style="float:left;margin:0" {CHECKED} />
                                    <div style="margin-left:20px;position:relative;top:-3px;color:#666666;" > {PERMISSION} {INFOMESSAGE} <img style="padding-left:5px;" class="{haschildrenpermissions}" src="../templates/admin/images/107.png" alt="" /></div>
                                </div>


                                {CHILDREN}
                            </div>
                            <!-- END DYNAMIC BLOCK: permissionsGroup -->
                            <!-- BEGIN DYNAMIC BLOCK: noPermissions -->
                            <div id="div_none_main" style="margin-left:20px" >
                                <div id="div_none" style="clear:left;padding-bottom:12px" >
                                    <div style="margin-left:20px" > [l]There are no permission available for this group.[/l]</div>
                                </div>
                            </div>
                            <!-- END DYNAMIC BLOCK: noPermissions -->
                        </td>
                    </tr>
                    <tr>
                        <td>
                              <input style="margin-left:20px;margin-top:20px;" type="submit" class="button" value="[l]Save[/l]"  />

                        </td>
                    </tr>
                </table>
        

    </div>
    <!-- END DYNAMIC BLOCK: permissionsSection -->


</form>
