{*Edit post form*}
{script}
{literal}
$("a.ticket_delete_attachment").each(function(){
var container_handler = $(this).closest(".attachment_container");
$(this).click(function(){
if ( confirm(OW.getLanguageText('iisticketing', 'confirm_delete_attachment')) )
{
var attachment_id = $(this).data("aid");
var attachmentDeleteCode = $(this).attr("code");
var params = {};
var url = "{/literal}{url_for_route for='iisticketing.delete_attachment'}{literal}";
params['attachmentId'] = attachment_id;
if(attachmentDeleteCode!=null && attachmentDeleteCode!=undefined)
{
params['attachmentDeleteCode'] = attachmentDeleteCode;
}
$.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}
{form name='edit-post-form'}
|
{input name='text' class="ow_smallmargin" id='post_body'}
{if isset($extendedText)}
{error name='text'}
{$extendedText}
{/if}
{*capture assign='postId'}{$post->id}{/capture*}
{if isset($attachments[$postId])}
{/if}
{$attachmentsCmp}
|