?
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/add_assessment_master.php |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?> <?php $this->load->view('documentreadyfunctions'); ?> <script src="<?= base_url() ?>assets/scripts/jquery.autocomplete.js"></script> <script type="text/javascript"> $(document).ready(function() { suggestClass_name('#class_name'); }); function suggestClass_name(div) { $(div).autocomplete("<?= site_url() ?>/master/autosuggestclass/", { width: 250, selectFirst: false }); } 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/insert_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> <!-- BEGIN PAGE LEVEL STYLES --> <!-- END PAGE LEVEL STYLES --> <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>Creating new 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/insert_assessment_master/view_assessment_master/1', $attributes); ?> <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"> <input type="text" name="class_name" id="class_name" data-id='class_name_id' value='' class="required span12" onchange="empty_text('class_name,#class_name_id,#student,#student_id')" /> <input type="hidden" name="class_name_id" id="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" 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"/> </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"/> </div> </div> </div> </div> <div class="row-fluid"> <div class="span6 "> <div class="control-group" style="display: none" id="detail1"> <label class="control-label">Course Code </label> <div class="controls" id="course_code"> </div> </div> </div> </div> <div class="form-actions"> <input type="hidden" name="resfunction" value="search_assessment_master"/> <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>