| Server IP : 94.136.191.34 / Your IP : 216.73.216.25 Web Server : Apache System : Linux hostpanel.netbiz.in 5.15.0-130-generic #140-Ubuntu SMP Wed Dec 18 17:59:53 UTC 2024 x86_64 User : omkar.com_6nnuz6y629h ( 10087) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system,proc_open,popen MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/omkar.com/httpdocs/application/views/admin/manage_video_gallery/ |
Upload File : |
<div class="row">
<!-- left column -->
<div class="col-md-12">
<!-- general form elements -->
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title"></h3>
<!-- /.box-header -->
<!-- form start -->
<form class="form-horizontal" autocomplete="off" enctype="multipart/form-data" name="project_highlight" id="project_highlight" action="<?php echo base_url(); ?>admin/home/save_video_gallery/<?php
if (!empty($info)) {
echo $info['id'];
} ?>" method="post">
<div class="box-body">
<?php if($this->session->flashdata('project_success_msg')!=""){ ?>
<div class="alert alert-success alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo $this->session->flashdata('project_success_msg');?>
</div>
<?php } ?>
<div class="form-group">
<label for="Floor Plan Name" class="col-sm-2 control-label">Name</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="highlight_name" highlight-id="<?php if (!empty($info)) { echo $info['id']; } ?>" name="title" placeholder="Video Name" value="<?php
if (!empty($info)) {
echo $info['title'];
}
?>" required>
<span id="highlight_name_error" class="text-red"></span>
</div>
</div>
<div class="form-group">
<label for="Floor Plan Name" class="col-sm-2 control-label">Link</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="link" name="link" placeholder="Embed Link" value="<?php
if (!empty($info)) {
echo $info['video_url'];
}
?>" required>
<span id="link_error" class="text-red"></span>
</div>
</div>
<div class="form-group">
<label for="project_nm1" class="col-sm-2 control-label">Media Date</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="media_date"id="datepicker" value="<?php
if (!empty($info)) {
echo $info['media_date'];
}
?>" required>
<span class="error"><?php echo form_error('media_date'); ?></span>
</div>
</div>
<!-- /.box-body -->
<div class="box-footer">
<button type="submit" class="btn btn-info pull-right">Update</button>
</div>
<!-- /.box-footer -->
</form>
</div>
</div>
</div>
<!-- Modal -->
<!-- <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Delete</h4>
</div>
<div class="modal-body">
<p>You are about to delete.</p>
<p>Do you want to proceed?</p>
</div>
<div class="modal-footer">
<button type="button" id="delete" class="btn btn-primary">Yes</button>
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
</div>
</div>
</div>
</div> -->
<script>
$( function() {
$( "#datepicker" ).datepicker({
autoclose: true,
format: 'yyyy-mm-dd',
// maxDate: 'now'
});
} );
$(document).ready(function(){
/*$(document).on('click', '.remove_levels', function (e) {
var project_id = $(this).attr("project-id");
var base_url = "<?php echo base_url();?>";
$(document).on('click', '#delete', function (e) {
$(location).attr('href', base_url+'admin/home/delete_amenity/'+project_id)
});
});*/
/*if(edit_thumb_img == ''){
console.log('ttt--'+edit_thumb_img);
$('#thumb_img').prop('required', true);
}else{
console.log('ttt--'+edit_thumb_img);
$('#thumb_img').prop('required', false);
}*/
});
$(document).on("submit","#project_highlight",function(){
var edit_thumb_img = $('#edit_thumb_img').val();
var dRegExpt = /^[A-z0-9 \.]+$/;
var dRegExp = /^[A-z0-9 ]+$/;
var highlight_name_error = false;
var link_error = false;
var media_date_error = false;
var thumb_error = false;
var highlight_name = $('#highlight_name').val();
var link = $('#link').val();
var thumb_img = $('#thumb_img').val();
var media_date = $('#datepicker').val();
var highlight_id = $('#highlight_name').attr("highlight-id");
if (highlight_name == "") {
$('#highlight_name_error').show().html('Please enter name');
highlight_name_error = true;
} else{
$('#highlight_name_error').hide().html('');
highlight_name_error = false;
}
if (link == "") {
$('#link_error').show().html('Please enter link address');
link_error = true;
} else{
$('#link_error').hide().html('');
link_error = false;
}
if (media_date == "") {
$('#media_date_error').show().html('Please select media date');
media_date_error = true;
} else{
$('#media_date_error').hide().html('');
media_date_error = false;
}
if(edit_thumb_img == '' && thumb_img == ''){
$('#thumb_error').show().html('Please upload image');
thumb_error = true;
} else{
$('#thumb_error').hide().html('');
thumb_error = false;
}
if(!highlight_name_error && !link_error && !thumb_error){
return true;
}else{
return false;
}
});
</script>