#include "/admin/util/editor/editor.html" />
#i18n{module.extend.comment.comment_config.pageTitle}
<@row>
<@columns sm=3>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelModerated}' >
<@radioButton name='moderated' id='modOk' value='true' labelKey='#i18n{portal.util.labelYes}' labelFor='modOk' orientation='' checked=commentConfig.moderated />
<@radioButton name='moderated' id='modNOk' value='false' labelKey='#i18n{portal.util.labelNo}' labelFor='modNOk' orientation='' checked=!commentConfig.moderated />
@formGroup>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelNbComments}' labelFor='nbComments' >
<@input type='number' name='nbComments' class='w-25' value='${commentConfig.nbComments!}' maxlength=2 min=1 />
@formGroup>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelAuthorizeSubComments}' >
<@radioButton name='authorizeSubComments' id='authorizeSubCommentsOk' value='true' labelKey='#i18n{portal.util.labelYes}' labelFor='authorizeSubCommentsOk' orientation='' checked=commentConfig.authorizeSubComments />
<@radioButton name='authorizeSubComments' id='authorizeSubCommentsNOk' value='false' labelKey='#i18n{portal.util.labelNo}' labelFor='authorizeSubCommentsNOk' orientation='' checked=!commentConfig.authorizeSubComments />
@formGroup>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelShowComments}' labelFor='displaySubComments' >
<@radioButton name='displaySubComments' id='displaySubCommentsOk' value='true' labelKey='#i18n{portal.util.labelYes}' labelFor='displaySubCommentsOk' orientation='' checked=commentConfig.displaySubComments />
<@radioButton name='displaySubComments' id='displaySubCommentsNOk' value='false' labelKey='#i18n{portal.util.labelNo}' labelFor='displaySubCommentsNOk' orientation='' checked=!commentConfig.displaySubComments />
@formGroup>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelTriComments}' labelFor='triCommentsByCreation' >
<@radioButton name='triCommentsByCreation' id='triCommentsByCreationOk' value='false' labelKey='#i18n{module.extend.comment.comment_config.labelTriCommentsParDateModification}' labelFor='triCommentsByCreationOk' orientation='' checked=!commentConfig.triCommentsByCreation />
<@radioButton name='triCommentsByCreation' id='triCommentsByCreationNOk' value='true' labelKey='#i18n{module.extend.comment.comment_config.labelTriCommentsParDateCreation}' labelFor='triCommentsByCreationNOk' orientation='' checked=commentConfig.triCommentsByCreation />
@formGroup>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelEnabledDeleteComments}' labelFor='deleteComments' >
<@radioButton name='deleteComments' id='extend-comment-delete-comments-enabled' value='true' labelKey='#i18n{portal.util.labelYes}' labelFor='extend-comment-delete-comments-enabled' orientation='' checked=commentConfig.deleteComments />
<@radioButton name='deleteComments' id='extend-comment-delete-comments-disabled' value='true' labelKey='#i18n{portal.util.labelNo}' labelFor='extend-comment-delete-comments-disabled' orientation='' checked=!commentConfig.deleteComments />
@formGroup>
@columns>
<@columns sm=3>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelEnabledAuthMode}' labelFor='enabledAuthMode' >
<@radioButton name='enabledAuthMode' id='extend-comment-auth-mode-enabled' value='true' labelKey='#i18n{portal.util.labelYes}' labelFor='extend-comment-auth-mode-enabled' orientation='' checked=commentConfig.enabledAuthMode />
<@radioButton name='enabledAuthMode' id='extend-comment-auth-mode-disabled' value='false' labelKey='#i18n{portal.util.labelNo}' labelFor='extend-comment-auth-mode-disabled' orientation='' checked=!commentConfig.enabledAuthMode />
@formGroup>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelMailingList}' labelFor='idMailingList' helpKey='#i18n{module.extend.comment.comment_config.labelMailingListComment}' >
<@select name='idMailingList' items=listIdsMailingList default_value='${commentConfig.idMailingList!}' />
@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.labelAddCommentPosition}' labelFor='addCommentPosition' >
<@select name='addCommentPosition' id='addCommentPosition' title='#i18n{module.extend.comment.comment_config.labelAddCommentPosition}'>
<#list allPositions?keys as position>
#list>
@select>
@formGroup>
@columns>
<@columns sm=5 offsetSm=1>
<@formGroup rows=2 labelKey='#i18n{module.extend.comment.comment_config.labelAdminComment}' labelFor='adminBadge' >
<@input type='textarea' name='adminBadge' class='richtext' >${commentConfig.adminBadge!}@input>
@formGroup>
<@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>