#include "/admin/util/editor/editor.html" />
<@row>
<@columns sm=3>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelModerated}' >
<#assign rbMod><#if commentConfig.moderated>true<#else>false#if>#assign>
<@radioButton name='moderated' id='modOk' value='true' labelKey='#i18n{portal.util.labelYes}' labelFor='modOk' orientation='' checked=rbMod?boolean />
<#assign rbMod><#if !commentConfig.moderated>true<#else>false#if>#assign>
<@radioButton name='moderated' id='modNOk' value='true' labelKey='#i18n{portal.util.labelNo}' labelFor='modNOk' orientation='' checked=rbMod?boolean />
@formGroup>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelAddCommentPosition}' labelFor='addCommentPosition' >
<@select name='addCommentPosition' id='addCommentPosition' title='#i18n{module.extend.comment.comment_config.labelAddCommentPosition}'>
<#list allPositions?keys as position>
#list>
@select>
@formGroup>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelNbComments}' labelFor='nbComments' >
<@input type='number' name='nbComments' value='${commentConfig.nbComments!}' maxlength=2 min=1 />
@formGroup>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelAuthorizeSubComments}' labelFor='authorizeSubComments' >
<#assign rbMod><#if commentConfig.authorizeSubComments>true<#else>false#if>#assign>
<@radioButton name='authorizeSubComments' id='authorizeSubCommentsOk' value='true' labelKey='#i18n{portal.util.labelYes}' labelFor='authorizeSubCommentsOk' orientation='' checked=rbMod?boolean />
<#assign rbMod><#if !commentConfig.authorizeSubComments>true<#else>false#if>#assign>
<@radioButton name='authorizeSubComments' id='authorizeSubCommentsNOk' value='true' labelKey='#i18n{portal.util.labelNo}' labelFor='authorizeSubCommentsNOk' orientation='' checked=rbMod?boolean />
@formGroup>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelShowComments}' labelFor='displaySubComments' >
<#assign rbMod><#if commentConfig.moderated>true<#else>false#if>#assign>
<@radioButton name='moderated' id='modOk' value='true' labelKey='#i18n{portal.util.labelYes}' labelFor='modOk' orientation='' checked=rbMod?boolean />
<#assign rbMod><#if !commentConfig.moderated>true<#else>false#if>#assign>
<@radioButton name='moderated' id='modNOk' value='true' labelKey='#i18n{portal.util.labelNo}' labelFor='modNOk' orientation='' checked=rbMod?boolean />
@formGroup>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelTriComments}' labelFor='triCommentsByCreation' >
<#assign rbMod><#if commentConfig.moderated>true<#else>false#if>#assign>
<@radioButton name='triCommentsByCreation' id='triCommentsByCreationOk' value='true' labelKey='#i18n{portal.util.labelYes}' labelFor='triCommentsByCreationOk' orientation='' checked=rbMod?boolean />
<#assign rbMod><#if !commentConfig.moderated>true<#else>false#if>#assign>
<@radioButton name='triCommentsByCreation' id='triCommentsByCreationNOk' value='true' labelKey='#i18n{portal.util.labelNo}' labelFor='triCommentsByCreationNOk' orientation='' checked=rbMod?boolean />
@formGroup>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelEnabledAuthMode}' labelFor='enabledAuthMode' >
<#assign rbMod><#if commentConfig.enabledAuthMode>true<#else>false#if>#assign>
<@radioButton name='enabledAuthMode' id='extend-comment-auth-mode-enabled' value='true' labelKey='#i18n{portal.util.labelYes}' labelFor='extend-comment-auth-mode-enabled' orientation='' checked=rbMod?boolean />
<#assign rbMod><#if !commentConfig.enabledAuthMode>true<#else>false#if>#assign>
<@radioButton name='enabledAuthMode' id='extend-comment-auth-mode-disabled' value='true' labelKey='#i18n{portal.util.labelNo}' labelFor='extend-comment-auth-mode-disabled' orientation='' checked=rbMod?boolean />
@formGroup>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelEnabledDeleteComments}' labelFor='deleteComments' >
<#assign rbMod><#if commentConfig.deleteComments>true<#else>false#if>#assign>
<@radioButton name='deleteComments' id='extend-comment-delete-comments-enabled' value='true' labelKey='#i18n{portal.util.labelYes}' labelFor='extend-comment-delete-comments-enabled' orientation='' checked=rbMod?boolean />
<#assign rbMod><#if !commentConfig.deleteComments>true<#else>false#if>#assign>
<@radioButton name='deleteComments' id='extend-comment-delete-comments-disabled' value='true' labelKey='#i18n{portal.util.labelNo}' labelFor='extend-comment-delete-comments-disabled' orientation='' checked=rbMod?boolean />
@formGroup>
@columns>
<@columns sm=4>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelMailingList}' labelFor='idMailingList' helpKey='#i18n{module.extend.comment.comment_config.labelMailingListComment}' >
<@select name="idMailingList" default_value="${commentConfig.idMailingList!}" items=listIdsMailingList />
@formGroup>
<#if workflow_list?has_content && workflow_list?size gt 1>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.workflow.labelWorkflow}' labelFor='idWorkflow' >
<@select name='idWorkflow' items=workflow_list default_value='${commentConfig.idWorkflow!}' />
@formGroup>
#if>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelAdminComment}' labelFor='adminBadge' >
<@input type='textarea' name='adminBadge' class='richtext' >${commentConfig.adminBadge!}@input>
@formGroup>
@columns>
<@columns sm=4>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelMessageCommentCreated}' labelFor='messageCommentCreated' >
<@input type='textarea' name='messageCommentCreated' class='richtext' >${commentConfig.messageCommentCreated!}@input>
@formGroup>
@columns>
@row>
<@initEditor />
<@extendScript>
/* Hide the options if unique vote is selected */
if ( $( '#extend-comment-auth-mode-disabled' ).prop( 'checked' ) != "undefined" && $( '#extend-comment-auth-mode-disabled' ).prop( 'checked' ) == "checked" ) {
$( '#extend-comment-delete-options' ).hide( );
}
$( '#extend-comment-auth-mode-disabled' ).click( function ( ) {
$( '#extend-comment-delete-options' ).hide( );
} );
$( '#extend-comment-auth-mode-enabled' ).click( function ( ) {
$( '#extend-comment-delete-options' ).show( );
} );
@extendScript>