{*Edit topic form*} {style} {literal} .ow_board_attachment_icon { display: inline-block; background-repeat: no-repeat; cursor: pointer; width: 14px; height: 17px; } .board_attachments_label { margin: 15px 0 5px; padding-left: 5px; font-weight: bold; } {/literal} {/style} {script} {literal} $('#toggle_attach_link').click(function(){ $('#attach_file_inputs').toggle(); }); $('#toggle_attach_edit_link').click(function(){ $('#attach_edit_file_inputs').toggle(); }); $(".ow_board_attachment").hover( function(){ $(this).find("a.board_delete_attachment").show(); }, function(){ $(this).find("a.board_delete_attachment").hide(); } ); $("a.board_delete_attachment").each(function(){ var container_handler = $(this).parent(); $(this).click(function(){ if ( confirm(OW.getLanguageText('board', 'confirm_delete_attachment')) ) { var attachment_id = $(this).attr("rel"); var params = {}; var url = '{/literal}{url_for_route for='board_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='board+new_topic_subject'} | {input name='title'} {error name='title'} |
{text key='board+new_topic_body'} | {input name='text' id='post_body'} {error name='text'} |
{text key='board+attachments'} |
{capture assign='postId'}{$post->id}{/capture}
{if isset($attachments[$postId])}
{foreach from=$attachments[$postId] item='attm'}
{/foreach} {/if} {text key='board+attach_files'}
{input name='attachments'}
|
{submit name='save' class="ow_ic_save"} |