<#-- Macro: editorProfileForm Description: The form of an editor profile, shared by its creation and modification pages. The editor is chosen at the creation only, the editor of the back office by default. The targets (plugins, roles, workgroups) are not shown for a default profile: it applies when no other profile of its editor does. Parameters: - action (string, required): the action of the form, createEditorProfile or modifyEditorProfile. - title (string, required): the title of the page. --> <#macro editorProfileForm action title> <@pageContainer> <@pageColumn> <@pageHeader title=title> <@aButton href='jsp/admin/admindashboard/ManageEditorProfiles.jsp' buttonIcon='arrow-left' title='#i18n{portal.util.labelBack}' /> <@messages errors=errors![] /> <@tform method='post' name='editor_profile' action='jsp/admin/admindashboard/ManageEditorProfiles.jsp' boxed=true> <@input type='hidden' name='action' value=action /> <#if profile.id gt 0><@input type='hidden' name='profile_id' value='${profile.id}' /> <@formGroup labelFor='profile_name' labelKey='#i18n{portal.admindashboard.editorProfile.labelName}' mandatory=true rows=2> <@input type='text' name='profile_name' id='profile_name' value='${profile.name!}' maxlength=100 mandatory=true /> <@formGroup labelFor='profile_description' labelKey='#i18n{portal.admindashboard.editorProfile.labelDescription}' rows=2> <@input type='text' name='profile_description' id='profile_description' value='${profile.description!}' maxlength=255 /> <#if action = 'createEditorProfile'> <@formGroup labelFor='profile_editor' labelKey='#i18n{portal.admindashboard.editorProfile.labelEditor}' helpKey='#i18n{portal.admindashboard.editorProfile.helpEditor}' mandatory=true rows=2> <@select id='profile_editor' name='profile_editor' items=editors_list default_value='${profile.editorName!}' mandatory=true /> <#else> <@formGroup labelKey='#i18n{portal.admindashboard.editorProfile.labelEditor}' helpKey='#i18n{portal.admindashboard.editorProfile.helpEditorFixed}' rows=2>

${editor_label!profile.editorName!}

<#if profile.default> <@alert color='info'>#i18n{portal.admindashboard.editorProfile.helpDefaultProfile} <#else> <@formGroup labelKey='#i18n{portal.admindashboard.editorProfile.labelPlugins}' helpKey='#i18n{portal.admindashboard.editorProfile.helpPlugins}' mandatory=true rows=2>
<#list plugins_list as plugin>
<@checkBox name='profile_plugins' id='profile_plugin_${plugin?index}' labelKey=plugin.name value=plugin.code checked=profile.plugins?seq_contains( plugin.code ) />
<@formGroup labelKey='#i18n{portal.admindashboard.editorProfile.labelRoles}' helpKey='#i18n{portal.admindashboard.editorProfile.helpRoles}' rows=2>
<#list roles_list as role>
<@checkBox name='profile_roles' id='profile_role_${role?index}' labelKey=role.name value=role.code checked=profile.roles?seq_contains( role.code ) />
<@formGroup labelKey='#i18n{portal.admindashboard.editorProfile.labelWorkgroups}' helpKey='#i18n{portal.admindashboard.editorProfile.helpWorkgroups}' rows=2> <#if workgroups_list?has_content>
<#list workgroups_list as workgroup>
<@checkBox name='profile_workgroups' id='profile_workgroup_${workgroup?index}' labelKey=workgroup.name value=workgroup.code checked=profile.workgroups?seq_contains( workgroup.code ) />
<#else>

#i18n{portal.admindashboard.editorProfile.labelNoWorkgroup}

<@formGroup labelFor='profile_config' labelKey='#i18n{portal.admindashboard.editorProfile.labelConfig}' helpKey='#i18n{portal.admindashboard.editorProfile.helpConfig}' rows=2> <@input type='textarea' name='profile_config' id='profile_config' class='font-monospace' rows=12>${(profile.config!'{}')?html} <@formGroup rows=2> <@button type='submit' buttonIcon='check' title='#i18n{portal.util.labelValidate}' color='primary' /> <@aButton href='jsp/admin/admindashboard/ManageEditorProfiles.jsp' buttonIcon='x' title='#i18n{portal.util.labelCancel}' color='danger' />