<script type="text/javascript">

function validateModuleSelected()
{
    if($("module").value == 0){

        return false;
    }

    location.href='index.php?fuse=admin&view=ViewGeneralGroups&module='+$("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]Access Groups[/l]</a></li>
    <!--
        <li><a href="index.php?fuse=support&view=ViewDepartments">[l]Departments[/l]</a></li>
    -->
    <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>
</ul>

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

<div class="table-summary" style="margin-bottom: 10px; margin-top: 5px;">
<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 -->
        <div class="vtab {moduleActive}">
		<div>
			<a href="index.php?fuse=admin&amp;view=admin&amp;view=AddEditGeneralGroup&amp;module={MODULENAME}&amp;group={groupId}" >{MODULENAMETRANSLATION}</a>
		</div>
		<div class="hidingBorder"></div>
	</div>
	<!-- END DYNAMIC BLOCK: modulespackage -->
    </div>
    <div id="vtabContent" style="padding-left:0px;">
        <table border="0">
                    <tr valign="top">
                        <td>
                            <!-- 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} </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>
