{if !$hide || $post_comment_request || $smarty.request.post_comment_preview} {if $post_comment_preview && !$preview_override}

{tr}{$post_title} Preview{/tr}

{include file='bitpackage:liberty/display_comment.tpl' comment=$postComment}
{/if} {form enctype="multipart/form-data" action="`$comments_return_url`#editcomments" id="editcomment-form"} {formfeedback hash=$formfeedback} {if $post_comment_request || $smarty.request.post_comment_preview || $comments_ajax} {legend legend=$post_title} {* This is a little extra value for the funky case when bw learns browser has js at the same time a preview is asked for This will keep comment in non-js mode until previewing is done. Things get messy without this *} {if !$gBitThemes->isJavascriptEnabled() || $no_js_preview == "y"} {/if}
{formlabel label="Title" for="comments-title"} {forminput} {formhelp note=""} {/forminput}
{if !$gBitUser->isRegistered()}
{formlabel label="Login" for="login-email"} {forminput}
{tr}Username or Email{/tr}
{tr}Password{/tr}
{tr}If you are already registered with {$gBitSystem->mConfig.site_title|default:"this site"} please enter your login details above.{/tr}
{/forminput}
{* captcha variant="row" id="post-captcha" style="display:none" *}
{forminput} {tr}Anonymous Post{/tr} {formhelp note=""} {/forminput}
{/if} {textarea id="commentpost" name="comment_data" rows=$gBitSystem->getConfig('comments_default_post_lines', 6)}{$postComment.data}{/textarea} {* @TODO perm check more accurately should be on root content object *} {if $gBitSystem->isFeatureActive( 'comments_allow_attachments' ) && $gBitUser->hasPermission('p_liberty_attach_attachments') } {* @TODO make edit_storage_list.tpl work with comments attachments - it is nested in edit_storage.tpl - for now bypass it, remove mime code when edit_storage.tpl can be used directly*} {* include file="bitpackage:liberty/edit_storage.tpl" *} {if $gLibertySystem->isPluginActive( $smarty.const.LIBERTY_DEFAULT_MIME_HANDLER )} {foreach from=$gLibertySystem->getAllMimeTemplates('upload') item=tpl} {include file=$tpl} {/foreach} {/if} {/if}
   
{/legend} {/if} {/form} {/if}