<div id="forum{id}">
	<div class="upload-image">
		<img id="image{id}" src="../{img}" class="float-left">
		<form enctype="multipart/form-data" action="ajax/actions_c.php" method="post" id="img_form{id}" class="float-right">
			<input type="hidden" id="token" name="token" value="{token}">
			<input type="hidden" id="id" name="id" value="{id}">
			<input type="hidden" id="load_forum_img" name="load_forum_img" value="1">
			<input type="hidden" id="phpaction" name="phpaction" value="1">
			<input class="imginput" type="file" id="img" accept="image/*" name="img">

			<div class="space"></div>

			<div class="btn float-left" onclick="$('#img_form{id}').submit()">Загрузить</div>

			<div id="img_result{id}"></div>
		</form>
	</div>

	<div class="clear"></div>

	<div class="form-input">
		<label for="forum_name{id}">Название</label>
		<input type="text" id="forum_name{id}" maxlength="250" autocomplete="off" value="{name}">
	</div>

	<div class="form-input">
		<label for="forum_description{id}">Описание</label>
		<input type="text" id="forum_description{id}" maxlength="500" autocomplete="off" value="{description}">
	</div>

	<div class="message-send">
		<div class="btn green float-left m-r-5" onclick="edit_forum('{id}')">Сохранить</div>
		<div class="btn red float-left" onclick="dell_forum('{id}')">Удалить</div>

		<div class="btn blue float-right" onclick="settings_forum_forums_position('{id}', '{section}', 'down')">Опустить</div>
		<div class="btn blue float-right m-r-5" onclick="settings_forum_forums_position('{id}', '{section}', 'up')">Поднять</div>
	</div>

	<div class="clear"></div>

	<div class="space"></div>
</div>

<script>
	$('#img_form{id}').submit(function(event)
	{
		NProgress.start();

		event.preventDefault();

		var data = new FormData($('#img_form{id}')[0]);

		$.ajax({
			type: 'POST',
			url: '../ajax/actions_c.php',
			data: data,
			contentType: false,
			processData: false,
		}).done(function (html){
			$('#img_result{id}').html(html);
			$('#img_form{id}')[0].reset();
		});

		NProgress.done();
	});

	$('#settings_forums_{section} > div.space').last().hide();
</script>