<inp2:adm_SetPopupSize width="750" height="400"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" section="in-portal:user_groups" permission_type="advanced:manage_permissions" prefix="g" title_preset="groups_edit_additional_permissions"/>

<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
	<tbody>
		<tr>
	  		<td>
	  			<script type="text/javascript">
	  				a_toolbar = new ToolBar();
					a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
							set_hidden_field('advanced_save', 1);
							submit_event('g-perm','OnGroupSavePermissions');
							}
						) );
					a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
								window_close();
							}
					 ) );

					a_toolbar.Render();
				</script>

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

<inp2:g_SaveWarning name="grid_save_warning"/>

<inp2:m_DefineElement name="permission_element" prefix="g-perm">
	<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
		<td>
			<inp2:m_param name="section_name"/>.<inp2:m_param name="perm_name"/>
		</td>
		<td>
	 		<input type="hidden" id="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" value="<inp2:{$prefix}_PermissionValue section_name="$section_name" perm_name="$perm_name"/>">
			<input type="checkbox" align="absmiddle" id="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" <inp2:m_if check="{$prefix}_PermissionValue" section_name="$section_name" perm_name="$perm_name" value="1">checked</inp2:m_if> onchange="update_checkbox(this, document.getElementById('<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]'));">
		</td>
	</tr>
</inp2:m_DefineElement>


<inp2:m_DefineElement name="old_permission_element" prefix="g-perm">
	<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
		<td>
			<inp2:m_phrase name="$label"/>
		</td>
		<td>
	 		<input type="hidden" id="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" value="<inp2:{$prefix}_PermissionValue section_name="$section_name" perm_name="$perm_name"/>">
			<input type="checkbox" align="absmiddle" id="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" name="_cb_<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]" <inp2:m_if check="{$prefix}_PermissionValue" section_name="$section_name" perm_name="$perm_name" value="1">checked</inp2:m_if> onchange="update_checkbox(this, document.getElementById('<inp2:m_param name="prefix"/>[<inp2:m_param name="section_name"/>][<inp2:m_param name="perm_name"/>]'));">
		</td>
	</tr>
</inp2:m_DefineElement>

<inp2:g-perm_LoadPermissions/>

<div id="scroll_container">
	<table class="edit-form">
		<inp2:m_set g-perm_sequence="1" odd_even="table-color1"/>

		<tr class="subsectiontitle">
			<td><inp2:m_phrase label="la_col_PermissionName"/></td>
			<td><inp2:m_phrase label="la_col_PermissionValue"/></td>
		</tr>
		<inp2:m_if check="m_GetEquals" name="section_name" value="in-portal:root">
			<inp2:m_RenderElement name="old_permission_element" section_name="in-portal:root" perm_name="LOGIN" label="lu_PermName_Login_desc"/>
			<inp2:m_RenderElement name="old_permission_element" section_name="in-portal:root" perm_name="ADMIN" label="lu_PermName_Admin_desc"/>
			<inp2:m_RenderElement name="old_permission_element" section_name="in-portal:root" perm_name="SYSTEM_ACCESS.READONLY" label="la_PermName_SystemAccess.ReadOnly_desc"/>
		<inp2:m_else/>
			<inp2:adm_ListSectionPermissions render_as="permission_element" type="1"/>
		</inp2:m_if>
	</table>
</div>

<inp2:m_include t="incs/footer"/>