{script} {literal} $("a.ticket_delete_attachment").each(function(){ var container_handler = $(this).parent(); $(this).click(function(){ if ( confirm(OW.getLanguageText('iisticketing', 'confirm_delete_attachment')) ){ var attachment_id = $(this).attr("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-ticket-form'}
{input name='title' class="ow_smallmargin"}
{error name='title'}
{input name='description' class="ow_smallmargin"}
{error name='description'}
{$attachmentsCmp}
{foreach from=$attachments item='attm'}
{if $attm.downloadUrl != ''}{$attm.fileName}{else}{$attm.fileName}{/if} ({$attm.fileSize}Kb)
{if isset($attachmentDeleteCode)} {else} {/if}
{/foreach}
{input name='category' class="ow_smallmargin"}
{error name='category'}
{input name='order' class="ow_smallmargin"}
{error name='order'}
{submit name='submit' class='ow_positive'}
{submit name='cancel'}
{/form}