<?php
	$slider_imgs = array();
	
	$slider_url = '';
	if( isset( $otw_saved_data['slider_url'] ) && strlen( trim( $otw_saved_data['slider_url'] ) ) ){
		$slider_imgs = explode( ',', $otw_saved_data['slider_url'] );
		$slider_url = $otw_saved_data['slider_url'];
	}
?>
<table class="form-table">
	<tbody>
		<tr valign="top" class="cm-js-meta-slider">
			<th scope="row"><label for="slider"><?php _e('Image/s', 'otw_cm');?></label></th>
			<td>
				<a href="javascript:;" class="otw-add-portfolio-image left"><?php _e('Add File', 'otw_cm');?></a><br/>
				<input type="hidden" name="otw-cm-list-slider_url" class="cm-js-img-slider-url" value="<?php echo $slider_url?>" />
				<!-- Preview Items will be appended here -->
				<ul class="cm-slider-preview left cm-js-meta-slider-preview">
					<?php 
					foreach( $slider_imgs as $image ):
						?>
						<li class="cm-slider__item" data-src="<?php echo $image ?>">
							<a href="#" class="cm-delete_btn"></a>
							<img src="<?php echo $image ?>" width="100" />
						</li>
						<?php
					endforeach;
					?>
				</ul>
			</td>
		</tr>
	</tbody>
</table>
