	<div class="r_block">
		<div class="r_block_head">
			<span class="glyphicon glyphicon-plus"></span> Создать тикет
		</div> 
		<div class="r_block_c">
			<div class="form-group">
				<b><span class="glyphicon glyphicon-comment"></span> Тема </b>
				<input type="text" class="form-control" id="name" maxlength="255" autocomplete="off">
			</div>
			<div class="form-group">
				<b><span class="glyphicon glyphicon-pencil"></span> Текст</b>
				<textarea id="text" class="form-control maxMinW100" rows="10" maxlength="2000"></textarea>
			</div>
			<form enctype="multipart/form-data" action="../ajax/actions_a.php" method="POST" id="load_file_form">
				<input class="disp-n vis-h" type="text" id="token" name="token" value="{token}">
				<input class="disp-n vis-h" type="text" id="load_file" name="load_file" value="1">
				<input class="disp-n vis-h" type="text" id="phpaction" name="phpaction" value="1">
				<input type="file" class="input-file f-l" name="file" id="file">
				<button id="load_btn" type="submit" class="btn btn-default f-l btn-big ml-10">Загрузить</button>
				<br><br>
				<div id="load_file_result"></div>
			</form>
			<br><small class="mt-10" id="load_error_message">* Разрешаемое расширение файла: rar, zip, 7z, jpg, jpeg, png</small>
			<div id="ticket_result"></div>
			<button onclick="add_ticket();" type="button" class="btn2 ">Создать</button><br>
		</div>
	</div>
	<script>
		$(document).ready(function() {
			init_tinymce("text", "lite", "{file_manager_theme}", "{file_manager}", "{{md5($conf->code)}}");
		});
		$("#load_file_form").submit(function (event){
			event.preventDefault();
			var data = new FormData($('#load_file_form')[0]);
			$.ajax({
				type: "POST",
				url: "../ajax/actions_a.php",
				data: data,
				contentType: false,
				processData: false,
				beforeSend: function() {
					$('#load_btn').empty();
					$('#load_btn').append('<img id="file_loader" src="{site_host}templates/{template}/img/loader.gif">');
				}
			}).done(function (html) {
				$("#load_file_result").empty();
				$("#load_file_result").append(html);
				$('#load_btn').empty();
				$('#load_btn').append('Загрузить');
				$('#load_file_form')[0].reset();
			});
		});
	</script>
</div>

<div class="left_block">
	{include file="/home/right_col.tpl"}
</div>
