@row>
<@columns sm=3>
<@box>
<@boxHeader title='#i18n{portal.rbac.modify_role.titleModifyRole}' />
<@boxBody>
<@tform method='post' action='jsp/admin/rbac/DoModifyRole.jsp' name='modify_role'>
<@input type='hidden' name='role_key_previous' value='${role.key}' />
<@input type='hidden' name='token' value='${token}' />
<@formGroup labelKey='#i18n{portal.rbac.modify_role.labelKey}' labelFor='role_key' mandatory=true rows=2>
<@input type='text' id='role_key' name='role_key' value='${role.key}' readonly=true />
@formGroup>
<@formGroup labelKey='#i18n{portal.rbac.modify_role.labelDescription}' labelFor='role_description' mandatory=true rows=2>
<@input type='text' id='role_description' name='role_description' value='${role.description}' maxlength=255 />
@formGroup>
<#if has_right_manage_front_role>
<@formGroup rows=2>
<@checkBox orientation='switch' name='can_be_assigned_to_user_front' id='can_be_assigned_to_user_front' value='true' labelKey='#i18n{portal.rbac.modify_role.labelCanBeAssignedToUserFront}' labelFor='can_be_assigned_to_user_front' checked=exist_front_role />
@formGroup>
#if>
<@formGroup rows=2 class='mt-3'>
<@button type='submit' name='apply' title='#i18n{portal.util.labelValidate}' buttonIcon='save' color='primary' size=''/>
<@aButton href='jsp/admin/rbac/ManageRoles.jsp' title='#i18n{portal.admin.message.buttonCancel}' buttonIcon='times' color='default' size=''/>
@formGroup>
@tform>
@boxBody>
@box>
@columns>
<@columns sm=9>
<@box>
<@boxHeader title='#i18n{portal.rbac.modify_role.titleModifyRole} ${role.key} - ${role.description}' skipHeader=true >
<@tform type='inline' method='post' action='jsp/admin/rbac/AddControlToRole.jsp'>
<@input type='hidden' name='role_key' value='${role.key}' />
<@formGroup groupStyle='addons'>
<@inputGroup class=''>
<@select name='resource_type' size='sm'>
<#list resource_type_list?sort_by('resourceTypeLabel') as resource_type> #list>
@select>
<@inputGroupItem>
<@button type='submit' title='#i18n{portal.rbac.view_role_description.buttonLabelAddControl}' hideTitle=['all'] buttonIcon='plus' size='sm' />
@inputGroupItem>
@inputGroup>
@formGroup>
@tform>
@boxHeader>
<@boxBody>
<@table>
<@tr>
<@th>#i18n{portal.rbac.view_role_description.columnTitleResourceType}@th>
<@th>#i18n{portal.rbac.view_role_description.columnTitleResourceId}@th>
<@th>#i18n{portal.rbac.view_role_description.columnTitlePermission}@th>
<@th>#i18n{portal.rbac.view_role_description.columnTitleDeleteControl}@th>
@tr>
<@tableHeadBodySeparator />
<#assign previousResourceTypeKey="">
<#list controled_resource_list as controled_resource>
<@tr>
<@td>
<#if controled_resource.resourceTypeKey!=previousResourceTypeKey>${controled_resource.resourceTypeLabel} (${controled_resource.resourceTypeKey})#if>
@td>
<@td>${controled_resource.resourceIdLabel} (${controled_resource.resourceId})@td>
<@td>${controled_resource.permissionLabel} (${controled_resource.permissionKey})@td>
<@td>
<@tform method='post' action='jsp/admin/rbac/DoConfirmRemoveControlFromRole.jsp'>
<@input type='hidden' name='rbac_id' value='${controled_resource.RBACId}' />
<@button type='submit' title='#i18n{portal.rbac.view_role_description.buttonLabelDeleteControl}' buttonIcon='trash' size='sm' hideTitle=['all'] color='danger' />
@tform>
@td>
@tr>
<#assign previousResourceTypeKey=controled_resource.resourceTypeKey>
#list>
@table>
@boxBody>
@box>
@columns>
@row>