{*Edit topic form*} {script} {literal} $("a.forum_delete_attachment").each(function(){ var container_handler = $(this).closest(".attachment_container"); $(this).click(function(){ if ( confirm(OW.getLanguageText('forum', 'confirm_delete_attachment')) ) { var attachment_id = $(this).data("aid"); var params = {}; var url = '{/literal}{url_for_route for='forum_delete_attachment'}{literal}'; params['attachmentId'] = attachment_id; $.ajaxSetup({dataType: 'json'}); $.post(url, params, function(data){ if ( data.result == true ) { OW.info(data.msg); container_handler.remove(); } else if (data.error != undefined) { OW.warning(data.error); } }); } else { return false; } }); }); {/literal} {/script} {if $isHidden}
{text key='forum+new_topic_subject'} | {input name='title'} {error name='title'} |
{text key='forum+new_topic_body'} |
{input name='text' id='post_body'}
{error name='text'}
{if $enableAttachments}
{capture assign='postId'}{$post->id}{/capture}
{if isset($attachments[$postId])}
{/if}
{$attachmentsCmp}
{/if}
|