{/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|default:false || $gBitSystem->isFeatureActive('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}
{/if}
{textarea id="commentpost" name="comment_data" rows=$gBitSystem->getConfig('comments_default_post_lines',6) edit=$postComment.data|default:''}
{* @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}