<?php
/**
 * @var $attachments
 */
?>

<div class="audio-uploader-wrapper uploadifive-uploader-wrapper" data-media-type="audio" data-maxnrofpictures="<?php echo wpj_get_media_max_upload_number( 'audio' ); ?>">

	<div class="hidden_input">

		<div id="queue"></div>

		<input id="file_upload_audio" name="file_upload_audio" type="file" accept="audio/*">

	</div>

	<div class="audio-wrapper cf">

		<div class="audio-new-file-wrapper file-content-wrapper js-new-file-wrapper not-sortable <?php if ( wpj_get_job_rejected_input( 'audio' ) == 'rejected-input' ) echo 'mb-6'; ?>" style="<?php if ( count( $attachments ) >= wpj_get_media_max_upload_number( 'audio' ) ) echo 'display: none'; ?>"><?php _e( 'Drag & Drop an Audio or <span>Browse</span>', 'wpjobster' ); ?></div>

		<?php if ( $attachments ) {

			foreach ( $attachments as $attachment ) { ?>

				<div class="file-wrapper audio-file-wrapper pr" id="<?php echo $attachment->ID; ?>" data-audio-id="<?php echo $attachment->ID; ?>">

					<p><?php echo basename( get_attached_file( $attachment->ID ) ); ?></p>

					<a data-attachment-id="<?php echo $attachment->ID; ?>" data-media-type="audio" class="js-delete-file delete-file delete-audio cursor-pointer">
						<i class="x icon"></i>
					</a>

				</div>

			<?php }

		} ?>

	</div>

</div>