<!-- IF TPL_ADD_ATTACHMENT -->
<!--========================================================================-->
<script>
$(function() {
    $('.custom-file').pxFile();
});
</script>
<div class="panel"><div class="panel-heading">
    <div class="panel-title">{L_ADD_ATTACHMENT_TITLE}</div>
</div>
</div>

<div class="form-group">
	<label class="col-md-3 control-label">{L_FILENAME}</label>
	<div class="col-md-9">
		<label class="custom-file px-file">
			<input type="file" class="custom-file-input" name="fileupload" size="45" maxlength="{FILESIZE}">
			<span class="custom-file-control form-control">{L_ADD_ATTACHMENT_TITLE} ...</span>
			<div class="px-file-buttons">
				<button type="button" class="btn px-file-clear">Очистить</button>
				<button type="button" class="btn btn-primary px-file-browse">Обзор</button>
			</div>
		</label>
		<small class="text-muted">{L_ADD_ATTACHMENT_EXPLAIN}</small>
	</div>
</div>
<div class="form-group">
	<label class="col-md-3 control-label">{L_FILE_COMMENT}</label>
	<div class="col-md-9">
		<div class="input-group">
			<input class="form-control" type="text" name="filecomment" size="45" maxlength="255" value="{FILE_COMMENT}" />
			<span class="input-group-btn">
				<input type="submit" class="btn" name="add_attachment" value="{L_ADD_ATTACHMENT}" />
			</span>
		</div>
	</div>
</div>

<!--========================================================================-->
<!-- ENDIF / TPL_ADD_ATTACHMENT -->

<!-- IF TPL_POSTED_ATTACHMENTS -->
<!--========================================================================-->
<div class="panel">
	<div class="panel-heading">
		<div class="panel-title">{L_POSTED_ATTACHMENTS}</div>
	</div>
</div>

<!-- BEGIN attach_row -->
<div class="form-group">
	<label class="col-md-3 control-label">{L_FILENAME}</label>
	<div class="col-md-9">
		<a class="gen" href="{attach_row.U_VIEW_ATTACHMENT}" target="_blank"><b>{attach_row.FILE_NAME}</b></a>
	</div>
</div>
<div class="form-group">
	<label class="col-md-3 control-label">{L_FILE_COMMENT}</label>
	<div class="col-md-9">
		<div class="input-group">
			<input class="form-control" type="text" name="comment_list[]" size="45" maxlength="255" value="{attach_row.FILE_COMMENT}" />
			<span class="input-group-btn">
				<input class="btn" type="submit" name="edit_comment[{attach_row.ATTACH_FILENAME}]" value="{L_UPDATE_COMMENT}" />
			</span>
		</div>
	</div>
</div>
<div class="form-group">
	<label class="col-md-3 control-label">{L_OPTIONS}</label>
	<div class="col-md-9">
		<!-- BEGIN switch_update_attachment -->
		<input class="btn btn-3d btn-success" type="submit" name="update_attachment[{attach_row.ATTACH_ID}]" value="{L_UPLOAD_NEW_VERSION}" />&nbsp;
		<!-- END switch_update_attachment -->
		<input class="btn btn-3d btn-danger" type="submit" name="del_attachment[{attach_row.ATTACH_FILENAME}]" value="{L_DELETE_ATTACHMENT}" />&nbsp;
		<!-- BEGIN switch_thumbnail -->
		<input class="btn btn-3d btn-danger" type="submit" name="del_thumbnail[{attach_row.ATTACH_FILENAME}]" value="{L_DELETE_THUMBNAIL}" />&nbsp;
		<!-- END switch_thumbnail -->
	</div>
</div>
<hr class="m-b-0">
<!-- END attach_row -->

<!--========================================================================-->
<!-- ENDIF / TPL_POSTED_ATTACHMENTS -->