<#include "/admin/util/editor/editor.html" /> <#function isSelected entry default_values > <#if default_values?has_content> <#list default_values as default_value> <#if default_value=entry> <#return true> <#return false> <#assign mandatoryIcon> <@icon style='asterisk' /> <@row> <@columns sm=10>

#i18n{module.workflow.formsautomaticassignment.task_config.title}


<@columns sm=2> <@row> <@columns sm=4> <@formGroup labelFor='title' labelKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_title}' helpKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_title}' rows=2 mandatory=true> <#if config?exists && config.title??> <@input type='text' name='title' value=config.title maxlength=255 /> <#else> <@input type='text' name='title' maxlength=255 /> <@formGroup labelFor='directory' labelKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_form}' helpKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_form_comment} #i18n{module.workflow.formsautomaticassignment.task_config.label_form_comment_assign}' rows=2> <@inputGroup> <@select name='id_form' default_value='${config.idForm}' items=form_list /> <@inputGroupItem> <@button type='submit' name='apply' value='apply' title='#i18n{module.workflow.formsautomaticassignment.task_config.update_button}' hideTitle=['all'] buttonIcon='check' /> <@formGroup labelKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_notification}' hideLabel=['all'] rows=2> <@checkBox labelFor='is_notify' labelKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_notification}' name='is_notify' id='is_notify' value='1' checked=(config?exists && config.notify) params='onclick="javascript:notification();"' /> <#if config??> <#if authorized_question_list??> <@formGroup labelKey='#i18n{module.workflow.formsautomaticassignment.task_config.question_list.title}' rows=2> <#if authorized_question_list?size = 0> <@staticText>#i18n{module.workflow.formsautomaticassignment.task_config.question_list.label.noentry} <#else> <@table> <@tr> <@th>#i18n{module.workflow.formsautomaticassignment.task_config.label.question} <@th>#i18n{module.workflow.formsautomaticassignment.task_config.label.actions} <#list authorized_question_list as question> <@tr> <@td>${question.title} <@td> <@aButton href='jsp/admin/plugins/workflow/modules/formsautomaticassignment/ModifyQuestionAssignment.jsp?id_task=${config.idTask}&id_question=${question.id}' buttonIcon='edit' size='sm' /> <@columns sm=8 id='notification'> <@row> <@columns sm=8 > <@formGroup labelKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_mapping_workgroup_mailing_list}' rows=2> <#if workgroup_list?has_content> <#assign is_first = true> <#list workgroup_list as workgroup> <#if !is_first> <#else> <#assign is_first = false> <@checkBox labelFor='workgroups' labelKey='${workgroup.item.description}' id='workgroups' name='workgroups' value='${workgroup.item.key}' checked=(workgroup.config?exists) /> <@formLabel>#i18n{module.workflow.formsautomaticassignment.task_config.label_notification} <#if workgroup.config?exists> <@select name='id_mailing_list_${workgroup.item.key}' items=mailing_list default_value='${workgroup.config.idMailingList}' /> <#else> <@select name='id_mailing_list_${workgroup.item.key}' items=mailing_list default_value='-1' />
<#else> <@staticText>#i18n{module.workflow.formsautomaticassignment.task_config.no_working_group} <@formGroup labelFor='sender_name' labelKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_user_name} ${mandatoryIcon}' helpKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_user_name_comment}' rows=2> <#if config?exists&&config.senderName?exists> <@input type='text' name='sender_name' value='${config.senderName}' maxlength=255 /> <#else> <@input type='text' name='sender_name' value='' maxlength=255 /> <@formGroup labelFor='recipients_cc' labelKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_recipients_cc}' helpKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_recipients_cc_comment}' rows=2> <#if config?exists && config.recipientsCc?has_content> <@input type='text' name='recipients_cc' value='${config.recipientsCc}' maxlength=255 /> <#else> <@input type='text' name='recipients_cc' value='' maxlength=255 /> <@formGroup labelFor='recipients_bcc' labelKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_recipients_bcc}' helpKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_recipients_bcc_comment}' rows=2> <#if config?exists && config.recipientsBcc?has_content> <@input type='text' name='recipients_bcc' value='${config.recipientsBcc}' maxlength=255 /> <#else> <@input type='text' name='recipients_bcc' value='' maxlength=255 /> <@formGroup labelFor='suject' labelKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_subject} ${mandatoryIcon}' helpKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_subject_comment}' rows=2> <#if config?exists&&config.subject?exists> <@input type='text' name='subject' value='${config.subject}' maxlength=255 /> <#else> <@input type='text' name='subject' value='' maxlength=255 /> <@formGroup labelFor='message' labelKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_message} ${mandatoryIcon}' helpKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_message_comment}' rows=2>
<#if config?exists && config.message?exists> <@input type='textarea' name='message' id='' rows=5 cols=80 richtext=true>${config.message} <#else> <@input type='textarea' name='message' id='' rows=5 cols=80 richtext=true />
<@columns sm=4> <#if full_question_list??> <@fieldSet legend='#i18n{module.workflow.formsautomaticassignment.task_config.full_question_list.title}'> <#if full_question_list?size = 0>

#i18n{module.workflow.formsautomaticassignment.task_config.question_list.label.noentry}

<#else> <@table> #i18n{module.workflow.formsautomaticassignment.task_config.label.question} #i18n{module.workflow.formsautomaticassignment.task_config.label.freemarker} <#list full_question_list as question> <#if question?? && question.title??> ${question.title} ${question_${question.id}!} <#if question_types_file_list?? && question_types_file_list?has_content> <@fieldSet legend='#i18n{module.workflow.formsautomaticassignment.task_config.label_question_file}'>
<@table> #i18n{module.workflow.formsautomaticassignment.task_config.label_file_checked} #i18n{module.workflow.formsautomaticassignment.task_config.label_file_name} <#list question_types_file_list as question> <@checkBox labelFor='' labelKey='' name='list_position_question_file_checked' id='list_position_question_file_checked' value='${question.entry.position}' checked=( config.listPositionsQuestionFile?? && config.listPositionsQuestionFile?has_content && isSelected( question.entry.position, config.listPositionsQuestionFile )) /> ${question.title} <@formGroup labelKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_view_form_response}' hideLabel=['all'] helpKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_view_form_response_comment}' rows=2> <@checkBox labelFor='view_form_response' labelKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_view_form_response}' name='view_form_response' id='view_form_response' value='1' checked=(config?exists && config.viewFormResponse) />
<@formGroup labelFor='label_link_view_form_response' labelKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_label_link_view_form_response} ${mandatoryIcon}' helpKey='#i18n{module.workflow.formsautomaticassignment.task_config.label_label_link_view_form_response_comment} #i18n{module.workflow.formsautomaticassignment.task_config.label_freemarker_link_view_form_response}' rows=2> <#if config?exists && config.labelLinkViewRecord?has_content> <@input type='text' name='label_link_view_form_response' value='${config.labelLinkViewRecord}' maxlength=255 /> <#else> <@input type='text' name='label_link_view_form_response' value='' maxlength=255 />
<@initEditor />