<!--begin::Card-->
<div class="card card-custom gutter-b example example-compact">
	<div class="card-header">
		<h3 class="card-title"><?=$form_heading?></h3>
	</div>
	<?=form_open_multipart('',['class'=>'form','autocomplete'=>'off','onsubmit'=>'blockPage()'])?>
		<div class="card-body">
			<div class="form-group row">
				<label class="col-lg-1 col-form-label text-lg-right">Title</label>
				<div class="col-lg-3">
					<input type="text" name="title" id="title" value="<?=set_value('title',$update_data['title'] ?? '')?>" class="form-control" placeholder="Enter Banner Title" required/>					
					<?=$validation->showError('title')?>
				</div>
				<label class="col-lg-1 col-form-label text-lg-right">Type</label>
				<div class="col-lg-3">
					<select name="banner_type" id="banner_type" onchange="toggleBannerVideoFld();" class="form-control" required>
						<?=$cmObj->get_banner_type_options(set_value('banner_type',($update_data['banner_type'] ?? '')))?>
					</select>
					<?=$validation->showError('banner_type')?>
				</div>
				<label class="image_fld col-lg-1 col-form-label text-lg-right">Image</label>
				<div class="col-lg-3 image_fld">
					<div class="custom-file" data-toggle="tooltip" data-placement="bottom"  title="Image size should 1920x750px">
						<input type="file" class="custom-file-input" id="image" name="image" accept=".png,.jpg,.gif,jpeg" value="<?=set_value('image',$update_data['image'] ?? '')?>"/>
						<label class="custom-file-label" for="image">Choose file</label>
					</div>
					<?=$validation->showError('image')?>			      
					<?php $uploaded_image = set_value('uploaded_image',$update_data['image'] ?? ''); ?>
					<input type="hidden" name="uploaded_image" id="uploaded_image" value="<?=set_value('uploaded_image',$uploaded_image)?>" />
					<?php if($uploaded_image!=""){ ?>
						<div class="text-primary"><a href="javascript:;"  onclick="showLogo();">View uploaded</a></div>
					<?php } ?>
				</div>
				<label class="video_fld col-lg-1 col-form-label text-lg-right">Video URL</label>
				<div class="col-lg-3 video_fld">
					<input type="text" name="video_url" id="video_url" value="<?=set_value('video_url',$update_data['video_url'] ?? '')?>" class="form-control" placeholder="Video URL"/>					
					<?=$validation->showError('video_url')?>
				</div>
			</div>
			<div class="form-group row">
				<label class="col-lg-1 col-form-label text-lg-right">Link</label>
				<div class="col-lg-3">
					<input type="url" name="link" id="link" value="<?=set_value('link',$update_data['link'] ?? '')?>" class="form-control" placeholder="URL"/>					
					<?=$validation->showError('link')?>
				</div>
				<label class="col-lg-1 col-form-label text-lg-right">Open In New Tab</label>
				<div class="col-lg-3">
					<select name="open_in_new_tab" id="open_in_new_tab" class="form-control" required>
						<?=$cmObj->get_yes_no_options(set_value('open_in_new_tab',($update_data['open_in_new_tab'] ?? '')))?>
					</select>
					<?=$validation->showError('open_in_new_tab')?>
				</div>
				<label class="col-lg-1 col-form-label text-lg-right">Sort Order</label>
				<div class="col-lg-3">
					<input type="text" name="sort_order" id="sort_order" value="<?=set_value('sort_order',$update_data['sort_order'] ?? '')?>" class="form-control" placeholder="Enter Banner Sequence No." required/>					
					<?=$validation->showError('sort_order')?>
				</div>
			</div>
			<div class="form-group row">				
			    <label class="col-lg-1 col-form-label text-lg-right">Status</label>
				<div class="col-lg-3">
					<select name="status" id="status" class="form-control" required>
						<?=$cmObj->get_status_type(set_value('status',($update_data['status'] ?? '')))?>
					</select>
					<?=$validation->showError('status')?>
				</div>			
			</div>
		</div>
		<div class="card-footer">
			<div class="row">
				<div class="col-lg-12 text-center">
					<button type="submit" name="save" value="Save" class="btn btn-primary mr-2">Save</button>
				</div>
			</div>
		</div>
	</form>
</div>