?
Current Path : /home1/savoy/www/savoyglobal.net/eldertree/application/views/master/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/www/savoyglobal.net/eldertree/application/views/master/edit_assessment_master.php |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('documentreadyfunctions'); ?> <script> function datecheck() { if(callvalidate('validateform')) { var startDate = document.getElementById("date1").value; var endDate = document.getElementById("date").value; var date1=startDate.split('-'); var date2=endDate.split('-'); var sdate=new Date( date1[1]+"-"+date1[0]+"-"+date1[2]); var edate= new Date(date2[1]+"-"+date2[0]+"-"+date2[2]); if (sdate <= edate) { $.ajax({ type: "POST", url: "<?= site_url('master/addinmaster/update_assessment_master/view_assessment_master/1') ?>", data : $('.validate').serialize(), success: function(data){ $("#inner_content").html(data); $('html, body, #inner_content').animate({scrollTop:0}, 'slow'); $('#table-example').dataTable(); } }); return false; } else { alert("End date should be greater than Start date"); document.getElementById("date").value = ""; return false; } } return false; } </script> <div class="row-fluid"> <div class="tab-pane " id="tab_2"> <div class="portlet box yellow"> <div class="portlet-title"> <div class="caption"><i class="icon-reorder"></i>Updating Assessment</div> <div class="tools"> <a href="#" onclick="viewdata('master','viewinmastersearch','search_assessment_master','view_assessment_master','<?=$_SESSION['pagenum'];?>')" class="remove"></a> </div> </div> <div class="portlet-body form"> <!-- BEGIN FORM--> <?php $attributes = array('id' => 'validateform', 'class' => 'form-horizontal validate'); echo form_open('master/addinmaster/update_assessment_master/view_assessment_master/1',$attributes); $class=$this->mastermodel->get_data_srow('class_name',$viewinfo->class_name_id,'class_name_id'); ?> <h3 class="form-section"></h3> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Class Name </label> <div class="controls"> <?=$class->class_name_code?> <input type="hidden" name="class_name_id" value=" <?=$class->class_name_id?>"> </div> </div> </div> <div class="span6 "> <div class="control-group"> <label class="control-label">Assessment Name </label> <div class="controls"> <input name="assessment_master_name" id="assessment_master_name" type="text" value="<?=$viewinfo->assessment_master_name?>" class="required span12" /> </div> </div> </div> </div> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label"> Start date </label> <div class="controls"> <input name="start_date" id="date1" type="text" class="calfocus span12" value="<?=$this->mastermodel->convertdatenormalformat($viewinfo->start_date)?>"/> </div> </div> </div> <div class="span6 "> <div class="control-group"> <label class="control-label">End Date </label> <div class="controls"> <input name="end_date" id="date" type="text" class="calfocus span12" value="<?=$this->mastermodel->convertdatenormalformat($viewinfo->end_date)?>"/> </div> </div> </div> </div> <div class="form-actions"> <input type="hidden" name="resfunction" value="search_assessment_master"/> <input type="hidden" name="assessment_master_id" value="<?=$viewinfo->assessment_master_id?>"/> <button type="submit" onclick="return datecheck()" class="btn blue"><i class="icon-ok"></i> Save</button> <button type="button" onclick="viewdata('master','viewinmastersearch','search_assessment_master','view_assessment_master','<?=$_SESSION['pagenum'];?>')" class="btn">Cancel</button> </div> <?php echo form_close(); ?> <!-- END FORM--> </div> </div> </div> </div>