<!--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','onsubmit'=>'blockPage()'])?>

		<div class="card-body">
			<?php $validation->listErrors();?>
			<div class="form-group row">
				<label class="col-lg-1 col-form-label text-lg-right">Album</label>
				<div class="col-lg-3">
					<select required name="photo_album_id" id="photo_album_id" class="form-control" onchange="showProjectGroup(this.value)">
						<?=$cmObj->get_photo_album_options(set_value('photo_album_id',($update_data['photo_album_id'] ?? '')))?>
					</select>
					<?=$validation->showError('photo_album_id')?>
				</div>	
				<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="Title" />					
					<?=$validation->showError('title')?>
				</div>
				<label class="col-lg-1 col-form-label text-lg-right">Image</label>
				<div class="col-lg-3">
					<div class="custom-file" data-toggle="tooltip" data-placement="bottom"  title="Image size should 1080x955px">
						<input type="file" class="custom-file-input" id="image" name="image" accept=".png,.jpg,.gif,.jpeg"/>
						<label class="custom-file-label" for="image">Choose file</label>
					</div>
					<?=$validation->showError('image')?>
					<?php $uploaded_photo = set_value('uploaded_photo',$update_data['image'] ?? ''); ?>
					<input type="hidden" name="uploaded_photo" id="uploaded_photo" value="<?=set_value('uploaded_photo',$uploaded_photo)?>" />
					<?php if($uploaded_photo!=""){ ?>
						<div class="text-primary"><a href="<?=base_url('/public/uploads/'.$uploaded_photo)?>" target="_blank">View uploaded</a></div>					
					<?php } ?>
				</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 required name="status" id="status" class="form-control">
						<?=$cmObj->get_status_options(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>