<!-- BEGIN: MAIN -->
<div data-hefileapi="upload" data-uploadurl="{FILEUPLOAD_URL}" data-maxfilesize="{MAXFILESIZE}" data-mavcode="{MAVCODE}"class="attach">
  <div class="attach__items">
    <div class="attach__item _desc">
      <span class="attach__item-title">Прикрепить:</span>
      <div class="attach__item-desc">
        <p>Прикрепите фото или видеозаписи. Можно всё вместе.</p>
      </div>
    </div>
    <label for="attach-files" class="attach__item _photo attach__dropzone" data-fileapi="uploader_btns" data-fileformat="image/*">
      <span class="attach__item-title">Фотография</span>
    </label>
    <label class="attach__item _video" data-fileapi="uploader_btns" data-fileformat="video/*">
      <span class="attach__item-title">Видеозапись</span>
    </label>
  </div>


  <div data-hefileapi="uploadedfiles">
  	<div data-hefileapi="uploader" class="attach__files">
  		<div class="js-fileapi-wrapper">
  			<input type="file"  tabindex="-1" hidefocus="true" id="mavatar_file" name="mavatar_file[]" class="hidden"/>
  		</div>
  		<div data-fileapi="active.show" class="progress" style="display: none;">
          <div data-fileapi="progress" style="transition: none;" class="progress-bar progress-bar-warning" role="progressbar" aria-valuemin="0" aria-valuemax="100">
         </div>
  		</div>
      <div data-fileapi="dnd" data-fileformat="" class="attach__files-container" title="Перетащите файл или нажмите для выбора">
        <div class="attach__files-content">
          <span class="attach__file-title">Перетащите</span>
          <span class="attach__file-subtitle">сюда <b>фотографии</b>, чтобы прикрепить их</span>
        </div>
        <label for="attach-files" class="attach__file-label attach__dropzone"></label>
    	</div>
    	<!-- BEGIN: FILES -->
    		<!-- BEGIN: ROW -->
          <input name="mavatar_delete[{MAVATAR.ID}]" value="0" type="hidden">
          <div data-hefileapi="uploadedmavfile" class="dz-preview">
              <a href="{MAVATAR.FILE}" target="_blank">
                <!-- IF {MAVATAR.FILEEXT|cot_mavatar_is_photo($this)} -->
                  <img src="{MAVATAR|cot_mav_thumb($this, 150, 150, crop)}" title="{MAVATAR.FILEORIGNAME}.{MAVATAR.FILEEXT}" />
                <!-- ELSE -->
                  <img src="{MAVATAR.FILEEXT|cot_mavatar_file_icon($this)}" title="{MAVATAR.FILEORIGNAME}.{MAVATAR.FILEEXT}" style="max-width: 150px;max-height: 150px;" />
                <!-- ENDIF -->
              </a>
              <a role="button" data-mav="{MAVATAR.ID}" data-hefileapi="mavatardelete">x</a>
          </div>
    		<!-- END: ROW -->
    	<!-- END: FILES -->
  	</div>
  </div>
</div>
<!-- END: MAIN -->