<!--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 if($language_list){ ?>
			<div class="accordion accordion-toggle-arrow form-group" id="accordionLanguage">
			<?php foreach($language_list as $language){ ?>	
				<input type="hidden" name="testimonial_ln_id_<?=$language['code']?>" value="<?=set_value('testimonial_ln_id_'.$language['code'],$update_data['testimonial_ln_id_'.$language['code']] ?? '')?>">
				<div class="card">
					<div class="card-header">
						<div class="card-title" data-toggle="collapse" data-target="#<?=$language['code']?>">
							<?=$language['name']?>
						</div>
					</div>
					<div id="<?=$language['code']?>" class="collapse show" data-parent="#accordionLanguage">
						<div class="card-body">
							<div class="form-group row">
								<label class="col-lg-1 col-form-label text-lg-right">Name</label>
								<div class="col-lg-5">
									<input type="text" name="name_<?=$language['code']?>" id="name_<?=$language['code']?>" value="<?=set_value('name_'.$language['code'],$update_data['name_'.$language['code']] ?? '')?>" class="form-control" placeholder="Name" required />					
									<?=$validation->showError('name_'.$language['code'])?>
								</div>
								<label class="col-lg-1 col-form-label text-lg-right">City</label>
								<div class="col-lg-5">
									<input required type="text" name="city_<?=$language['code']?>" id="city_<?=$language['code']?>" value="<?=set_value('city_'.$language['code'],$update_data['city_'.$language['code']] ?? '')?>" class="form-control" placeholder="City" />					
									<?=$validation->showError('city_'.$language['code'])?>
								</div>
							</div>
							<div class="form-group row">				
								<label class="col-lg-1 col-form-label text-lg-right">Description</label>
								<div class="col-lg-5">
									<textarea name="description_<?=$language['code']?>" id="description_<?=$language['code']?>" class="form-control" placeholder="Description"><?=set_value('description_'.$language['code'],$update_data['description_'.$language['code']] ?? '')?></textarea>					
									<?=$validation->showError('description_'.$language['code'])?>
								</div>						
							</div>
						</div>
					</div>
				</div>
			<?php } ?>
			</div>
		<?php } ?>			
			<div class="form-group row">
				<label class="col-lg-1 col-form-label text-lg-right">Photo</label>
				<div class="col-lg-3">
					<div class="custom-file">
						<input type="file" class="custom-file-input" id="photo_image" name="photo_image" accept=".png,.jpg,.gif,jpeg"/>
						<label class="custom-file-label" for="photo_image">Choose file</label>
					</div>
					<?=$validation->showError('photo_image')?>
					<?php $uploaded_photo_image = set_value('uploaded_photo_image',$update_data['photo_image'] ?? ''); ?>
					<input type="hidden" name="uploaded_photo_image" id="uploaded_photo_image" value="<?=set_value('uploaded_photo_image',$uploaded_photo_image)?>" />
					<?php if($uploaded_photo_image!=""){ ?>
						<div class="text-primary"><a href="<?=base_url('public/uploads/'.$uploaded_photo_image)?>" target="_blank">View uploaded</a></div>					
					<?php } ?>
				</div>
				<label class="col-lg-1 col-form-label text-lg-right">Status</label>
				<div class="col-lg-2">
					<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>