 <? global $vis_language;?>
<form class="form-horizontal" method="post" enctype="multipart/form-data" name="vis_new_ticket_form" id="vis_ticket_post_content_form_<? echo $ticket_post['post_id']; ?>">
	<div class="form-group">
		<div class="col-sm-12">
			<textarea name="vis_ticket_post" id="vis_ticket_post_edit_<? echo $ticket_post['post_id']; ?>" class="form-control"><? echo $ticket_post['content']; ?></textarea>
		</div>
	</div>
	<div class="form-group">
		<div class="col-sm-12">		    
			<input name="vis_post_id" type="hidden" value="<? echo $ticket_post['post_id']; ?>" />
			<span class="btn btn-default" onclick="$('#vis_ticket_post_content_text_<? echo $ticket_post['post_id']; ?>').show(); $('#vis_ticket_post_content_edit_<? echo $ticket_post['post_id']; ?>').hide();"><? echo $vis_language['TXTDISCARD']; ?></span>
			<span class="btn btn-primary m-l-xs" onclick="$(this).visExecution('submit_form',{'vis_module':'ticket', 'vis_operation':'update_post', 'vis_form':'vis_ticket_post_content_form_<? echo $ticket_post['post_id']; ?>', 'vis_ticket_id':<? echo $operation['vis_ticket_id'];?>});"><? echo $vis_language['TXTUPDATE']; ?></span>
        </div>
    </div>
</form>
<script>
$('#vis_ticket_post_content_text_<? echo $ticket_post['post_id']; ?>').hide();
<? if(!defined('VIS_HTML_EDITOR') || VIS_HTML_EDITOR==1) { ?>    
	$(function(){
		$('#vis_ticket_post_edit_<? echo $ticket_post['post_id']; ?>').redactor({
			buttonSource: true,
			minHeight: 180, // pixels
			maxHeight: 180,
			imageUpload: "index.php?vis_tmpst="+new Date().getTime()+"&vis_module=ticket&vis_operation=upload_file&vis_static_area=editor_image_upload",
			imageUploadParam: 'files',            
            removeComments: true,
			focus: true,
			plugins: ['source'],
			deniedTags: ['html', 'head', 'link', 'body', 'meta', 'script','applet']
		});
	});
<? } ?>
</script>
