<!--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()','enctype' => 'multipart/form-data'])?>
		<div class="card-body">			
		<?=$validation->listErrors()?>
		<?php if($language_list){ ?>
			<div class="accordion accordion-toggle-arrow form-group" id="accordionLanguage">
			<?php foreach($language_list as $language){ ?>	
				<input type="hidden" name="page_ln_id_<?=$language['code']?>" value="<?=set_value('page_ln_id_'.$language['code'],$update_data['page_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">Title</label>
								<div class="col-lg-5">
									<input type="text" name="title_<?=$language['code']?>" id="title_<?=$language['code']?>" value="<?=set_value('title_'.$language['code'],$update_data['title_'.$language['code']] ?? '')?>" class="form-control" placeholder="Title" required />					
									<?=$validation->showError('title_'.$language['code'])?>
								</div>
								<label class="col-lg-1 col-form-label text-lg-right">Meta Title</label>
								<div class="col-lg-5">
									<input required type="text" name="meta_title_<?=$language['code']?>" id="meta_title_<?=$language['code']?>" value="<?=set_value('meta_title_'.$language['code'],$update_data['meta_title_'.$language['code']] ?? '')?>" class="form-control" placeholder="Enter Meta Title in Selected Language"/>					
									<?=$validation->showError('meta_title_'.$language['code'])?>
								</div>
							</div>
							<div class="form-group row">				
								<label class="col-lg-1 col-form-label text-lg-right">Meta Keywords</label>
								<div class="col-lg-5">
									<textarea name="meta_keywords_<?=$language['code']?>" id="meta_keywords_<?=$language['code']?>" class="form-control" placeholder="Meta Keywords in Selected Language"><?=set_value('meta_keywords_'.$language['code'],$update_data['meta_keywords_'.$language['code']] ?? '')?></textarea>					
									<?=$validation->showError('meta_keywords_'.$language['code'])?>
								</div>
								<label class="col-lg-1 col-form-label text-lg-right">Meta Description</label>
								<div class="col-lg-5">
									<textarea name="meta_description_<?=$language['code']?>" id="meta_description_<?=$language['code']?>" class="form-control" placeholder="Meta Description in Selected Language"><?=set_value('meta_description_'.$language['code'],$update_data['meta_description_'.$language['code']] ?? '')?></textarea>					
									<?=$validation->showError('meta_description_'.$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-11">
									<textarea name="description_<?=$language['code']?>" id="description_<?=$language['code']?>" class="form-control" placeholder="Description in Selected Language"><?=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">Url</label>
				<div class="col-lg-3">
					<input required type="text" name="page_url" id="page_url" value="<?=set_value('page_url',$update_data['page_url'] ?? '')?>" class="form-control" placeholder="Page Url"/>					
					<?=$validation->showError('page_url')?>
				</div>
				<div class="col-lg-1 pl-0 text-right">
					<button type="button" class="btn btn-info" style="width:100%" name="btn_generate_url" onclick="genAlnumStr('title_en','page_url');">Generate</button>
				</div>
				<label class="col-lg-1 col-form-label text-lg-right">Banner</label>
				<div class="col-lg-3">
					<div class="custom-file" data-toggle="tooltip" data-placement="bottom"  title="Image size should 1920x550px or 3.4:2 Ratio">
						<input type="file" class="custom-file-input" id="banner_image" name="banner_image" accept=".png,.jpg,.gif,jpeg"/>
						<label class="custom-file-label" for="banner_image">Choose file</label>
					</div>
					<?=$validation->showError('banner_image')?>
			    <?php $uploaded_banner_image = set_value('uploaded_banner_image',$update_data['banner_image'] ?? ''); ?>
					<input type="hidden" name="uploaded_banner_image" id="uploaded_banner_image" value="<?=set_value('uploaded_banner_image',$uploaded_banner_image)?>" />
					<?php if($uploaded_banner_image!=""){ ?>
						<div class="text-primary"><a href="javascript:;" onclick="showBannerImage();">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>