#include "all_entry_commons.html" />
<#include "/admin/util/editor/editor.html" />
${breadcrumb_template}
<@row>
<@columns>
<@box>
<@boxHeader title='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' />
<@boxBody>
<@tform action="${action}" enctype="multipart/form-data">
<@fieldSet legend='#i18n{forms.modifyEntry.titleQuestion} : "${form.title}"' hideLegend=['all']>
<#assign config=getFieldByCode( entry, "text_config")>
<@input type='hidden' name='id_entry' value='${entry.idEntry}' />
<@input type='hidden' name='id_step' value='${step.id}' />
<@input type='hidden' name='id_question' value='${question.id}' />
<@input type='hidden' name='width' id='width' value='0' />
<@formGroup labelKey='#i18n{forms.createEntry.labelType}'>
<@staticText><@tag color='info'>${entry.entryType.title}@tag>@staticText>
@formGroup>
<@formGroup labelFor='title' labelKey='#i18n{forms.createEntry.labelTitle}' helpKey='#i18n{forms.createEntry.labelTitleComment}' mandatory=true>
<@input type='text' name='title' id='title' value='${entry.title}' maxlength=255 />
@formGroup>
<@formGroup labelFor='entry_code' labelKey='#i18n{forms.createEntry.labelCode}' helpKey='#i18n{forms.createEntry.labelCodeComment}'>
<@input type='text' name='entry_code' id='entry_code' value='${entry.code}' maxlength=100 />
@formGroup>
<@formGroup labelFor='help_message' labelKey='#i18n{forms.createEntry.labelHelpMessage}'>
<@input type='textarea' name='help_message' id='help_message' rows=2>${entry.helpMessage}@input>
@formGroup>
<@formGroup labelFor='comment' labelKey='#i18n{forms.createEntry.labelComment}'>
<@input type='textarea' name='comment' id='comment' rows=2>${entry.comment}@input>
@formGroup>
<#assign placeholder = getFieldValueByCode(entry, "placeholder") >
<@formGroup labelFor='placeholder' labelKey='#i18n{forms.createEntry.labelPlaceholder}'>
<@input type='text' name='placeholder' id='placeholder' value=placeholder maxlength=100 />
@formGroup>
<@formGroup labelFor='value' labelKey='#i18n{forms.createEntry.labelValueDefault}'>
<@input type='text' name='value' id='value' value='${config.value}' />
@formGroup>
<@formGroup>
<#if entry.mandatory><#assign checked = true />#if>
<@checkBox orientation='switch' labelFor='mandatory' labelKey='#i18n{forms.createEntry.labelMandatory}' name='mandatory' id='mandatory' value='1' checked=checked />
@formGroup>
<@formGroup labelFor='errorMessage' labelKey='#i18n{forms.createEntry.labelMandatoryErrorMessage}' helpKey='#i18n{forms.createEntry.labelMandatoryErrorMessageHelp}'>
<@input type='textarea' name='errorMessage' id='errorMessage' rows=2>${entry.errorMessage!}@input>
@formGroup>
<@formGroup labelFor='max_size_enter' labelKey='#i18n{forms.createEntry.labelMaxSizeEnter}'>
<#assign field_max_size=getFieldValueByCode( entry, "max_size")>
<#if field_max_size?number!=-1>
<@input type='text' name='max_size_enter' id='max_size_enter' inputSize=5 value='${field_max_size?number}' />
<#else>
<@input type='text' name='max_size_enter' id='max_size_enter' inputSize=5 value='' />
#if>
@formGroup>
<@formGroup>
<#assign confirmFieldField=getFieldByCode( entry, "confirm_field")>
<#if confirmFieldField.value?boolean>
<#assign checkedValue = true />
<#assign confirmFieldTitle = confirmFieldField.title />
<#else>
<#assign checkedValue = false />
<#assign confirmFieldTitle ="" />
#if>
<@checkBox orientation='switch' labelFor='confirm_field' labelKey='#i18n{forms.createEntry.labelConfirmField}' name='confirm_field' id='confirm_field' value='1' params='onchange="javascript:changeVisilityConfirmFieldTitle();"' checked=checkedValue />
@formGroup>
<@formGroup labelFor='confirm_field_title' id="confirm_field_title_group" labelKey='#i18n{forms.createEntry.labelConfirmFieldTitle}'>
<@input type='text' name='confirm_field_title' id='confirm_field_title' value='${confirmFieldTitle!}' maxlength=255 />
@formGroup>
<@formGroup>
<@checkBox orientation='switch' labelFor='only_display_in_back' labelKey='#i18n{forms.createEntry.labelOnlyDisplayBack}' name='only_display_in_back' id='only_display_in_back' value='1' checked=entry.onlyDisplayInBack />
@formGroup>
<#if entry.exportable>
<@input type='hidden' name='exportable' value='1' />
#if>
<#if entry.exportablePdf>
<@input type='hidden' name='exportable_pdf' value='1' />
#if>
<@formGroup labelFor='css_class' labelKey='#i18n{forms.createEntry.labelCSSClass}' helpKey='#i18n{forms.createEntry.labelCSSClassComment}'>
<@input type='text' name='css_class' id='css_class' value='${entry.CSSClass!}' maxlength=255 />
@formGroup>
<@formGroup labelFor='illustration_image' labelKey='#i18n{forms.createEntry.labelIllustrationPicture}' helpKey='#i18n{forms.createEntry.labelIllustrationPictureHelp}'>
<#if getFieldByCode( entry, "illustration_image")??>
<#assign illustration_image_entry=getFieldByCode( entry, "illustration_image")>
<#assign image_id = illustration_image_entry.value>
<#list fields_list_by_id_entries as key, value>
<#if key = illustration_image_entry.idField>
<#assign image_url = value>
<@input type='file' id='illustration_image' showFileUrl=true name='illustration_image' fileName='#i18n{forms.modifyEntry.downloadPicture}' fileURL='${image_url!\'\'}' value=key />
#if>
#list>
<#if image_url == "null">
<@input type='file' id='illustration_image' name='illustration_image' />
#if>
<#else>
<@input type='file' id='illustration_image' name='illustration_image' />
#if>
@formGroup>
<@formGroup helpKey='#i18n{forms.createEntry.labelResponsesIndexedComment}'>
<@checkBox orientation='switch' labelFor='is_indexed' labelKey='#i18n{forms.createEntry.labelResponsesIndexed}' name='is_indexed' id='is_indexed' value='1' checked=entry.indexed />
@formGroup>
<@formGroup>
<#assign anonymizable=getFieldByCode( entry, "anonymizable")>
<#if anonymizable.value?boolean>
<#assign checkedValue = true />
<#assign anonPattern = anonymizable.title />
<#else>
<#assign checkedValue = false />
<#assign anonPattern ="" />
#if>
<@checkBox orientation='switch' labelFor='anonymizable' labelKey='#i18n{forms.createEntry.labelAnonymizable}' name='anonymizable' id='anonymizable' value='1' params='onchange="javascript:changeVisilityAnonymizePattern();"' checked=checkedValue />
@formGroup>
<@formGroup labelFor='anonymize_pattern' id="anonymize_pattern_group" labelKey='#i18n{forms.createEntry.labelAnonymizePattern}' helpKey='${anonymization_help_message}' >
<@input type='text' name='anonymize_pattern' id='anonymize_pattern' value='${anonPattern!}' maxlength=255 />
@formGroup>
<@formGroup labelFor='confirm_field_title' id="confirm_field_title_group" labelKey='#i18n{forms.createEntry.labelConfirmFieldTitle}'>
<@input type='text' name='confirm_field_title' id='confirm_field_title' value='${confirmFieldTitle!}' maxlength=255 />
@formGroup>
${question_modify_template!}
<@formGroup>
<@button type='submit' name='action_modifyQuestion' buttonIcon='save' title='#i18n{forms.modifyEntry.buttonSave}' hideTitle=['xs'] />
<@button type='submit' name='action_saveQuestion' buttonIcon='check' title='#i18n{forms.modifyEntry.buttonApply}' hideTitle=['xs'] />
<@button type='cancel' name='view_manageQuestions' buttonIcon='close' title='#i18n{forms.createEntry.buttonCancel}' hideTitle=['xs'] color='default' />
@formGroup>
@fieldSet>
@tform>
@boxBody>
@box>
@columns>
@row>
<@confirmField />
<@anonymPattern />
<@initEditor />