<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://cdn.rawgit.com/dubrox/Multiple-Dates-Picker-for-jQuery-UI/master/jquery-ui.multidatespicker.css" rel="stylesheet"/>
<link href="https://code.jquery.com/ui/1.12.1/themes/pepper-grinder/jquery-ui.css" rel="stylesheet"/>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<script src="https://cdn.rawgit.com/dubrox/Multiple-Dates-Picker-for-jQuery-UI/master/jquery-ui.multidatespicker.js"></script>
<div class="content-wrapper">
<?php /*?>    <section class="content-header">
      <h1><small>Add WorkPackage</small></h1>
      <ol class="breadcrumb">
        <li><?php echo anchor('dashboard','<i class="fa fa-dashboard"></i> Dashboard')?></li>
        <li><?php echo anchor('master/Activity','Activity')?></li>
        <li class="active">Add WorkPackage</li>
      </ol>
    </section> <?php */?>
    <?php 
    $last = $this->uri->total_segments();
    $courseid = $this->uri->segment($last);
    //print_r($lists);
    date_default_timezone_set('Asia/Kolkata');
    
    ?>
    
        <section class="content">
          <div class="row">
            <div class="col-xs-12">
              <div class="box">
                <div class="box-header">
                  <!-- <h3 class="box-title">class</h3> -->
                  <?php echo form_open("admin/Adminlte/add_more_attendee_to_course/{$courseid}",['name'=>'activity_form_add','id'=>'activity_form_add']);?>
          		  <?php echo form_hidden('my_array',['name'=>'doaction','id'=>'doaction']);?>
                  <?php echo $message;?>
                  <?php echo form_submit(['name'=>'save','value'=>'Save','class'=>'btn btn-default pull-right',
				  'style'=>'margin-left:5px;background-color: #ffffff;']); ?>
                  <?php echo anchor('','<i class="fa fa-fw fa-arrows"></i>'.strtoupper($lists->course_id_tag),['class'=>'btn btn-default pull-left disabled','style'=>'background-color: #ffffff;']);?>
                  <?php echo anchor('',strtoupper($lists->category),['class'=>'btn btn-default pull-left disabled','style'=>'background-color: #ffffff;']);?>
                  <?php echo anchor('',strtoupper($lists->class),['class'=>'btn btn-default pull-left disabled','style'=>'background-color: #ffffff;']);?>
                  <?php echo anchor('',strtoupper($lists->subject),['class'=>'btn btn-default pull-left disabled','style'=>'background-color: #ffffff;']);?>
                  <?php echo anchor('',strtoupper($lists->subject_code),['class'=>'btn btn-default pull-left disabled','style'=>'background-color: #ffffff;']);?>
                  <?php echo anchor('',strtoupper($lists->faculty),['class'=>'btn btn-default pull-left disabled','style'=>'background-color: #ffffff;']);?>
                  <?php echo anchor('',date("d-M-Y",strtotime($lists->course_start_date)),['class'=>'btn btn-default pull-left disabled','style'=>'background-color: #ffffff;']);?>
                  <?php echo anchor('',date("d-M-Y",strtotime($lists->course_end_date)),['class'=>'btn btn-default pull-left disabled','style'=>'background-color: #ffffff;']);?>
                  <?php echo anchor('',strtoupper($lists->class_start_time),['class'=>'btn btn-default pull-left disabled','style'=>'background-color: #ffffff;']);?>
                  <?php echo anchor('',strtoupper($lists->class_end_time),['class'=>'btn btn-default pull-left disabled','style'=>'background-color: #ffffff;']);?>
				  <?php echo anchor('',strtoupper($lists->class_duration_min." min"),['class'=>'btn btn-default pull-left disabled','style'=>'background-color: #ffffff;']);?>
				  <?php echo anchor('admin/Adminlte/course_list','<i class="fa fa-fw fa-arrows"></i> Course List',['class'=>'btn btn-default pull-right','style'=>'background-color: #ffffff;']); ?>    
                </div><!-- /.box-header -->
                <div class="box-body">
                <hr />
                	<div class="row">
                	<?php //print_r($payment);?>
                	
                		<div class="col-md-12">
                		
                            <div class="col-md-3" class="week1" >
                                <div class="form-group">
    								<?php  echo form_label('Student ','Student',['for'=>'week_days','class'=>'']);?><?php echo form_error('student[]'); ?>
    								<?php echo form_dropdown('student[]',$payment_st_class,set_value(),['class'=>'form-control select2 select2-hidden-accessible','multiple'=>'','data-placeholder'=>"Select a Student",'style'=>"width: 100%;",'tabindex'=>"-1", 'aria-hidden'=>"true"]);?>         					
                                </div>	
                            </div>
                                <?php /* ?>
                             <div class="col-md-3" class="customdate1">
                                <div class="form-group">
    								<?php echo form_label('custom Date','custom_date',['for'=>'custom_date','class'=>'']);?><?php echo form_error('custom_date'); ?>
                    				 <div class="input-group">
                        				 <div class="input-group-addon"><i class="fa fa-calendar"></i></div>
                        				 <?php echo form_input(['name'=>'custom_date','class'=>'form-control ','id'=>'mdp-demo','placeholder'=>'Enter Custom Date Multi',
        								 'value'=>set_value('custom_date')]);?><!--  <div id="mdp-demo"></div>-->
    								</div>
                                </div>
                            </div>  
                            <div class="col-md-3">
                            	<div class="bootstrap-timepicker"><div class="bootstrap-timepicker-widget dropdown-menu"><table><tbody><tr><td><a href="#" data-action="incrementHour"><i class="glyphicon glyphicon-chevron-up"></i></a></td><td class="separator">&nbsp;</td><td><a href="#" data-action="incrementMinute"><i class="glyphicon glyphicon-chevron-up"></i></a></td><td class="separator">&nbsp;</td><td class="meridian-column"><a href="#" data-action="toggleMeridian"><i class="glyphicon glyphicon-chevron-up"></i></a></td></tr><tr><td><span class="bootstrap-timepicker-hour">08</span></td> <td class="separator">:</td><td><span class="bootstrap-timepicker-minute">45</span></td> <td class="separator">&nbsp;</td><td><span class="bootstrap-timepicker-meridian">AM</span></td></tr><tr><td><a href="#" data-action="decrementHour"><i class="glyphicon glyphicon-chevron-down"></i></a></td><td class="separator"></td><td><a href="#" data-action="decrementMinute"><i class="glyphicon glyphicon-chevron-down"></i></a></td><td class="separator">&nbsp;</td><td><a href="#" data-action="toggleMeridian"><i class="glyphicon glyphicon-chevron-down"></i></a></td></tr></tbody></table></div>
                                    <div class="form-group">
        								<?php echo form_label('Class Time *','class_start_time',['for'=>'class_time']);?><?php echo form_error('class_start_time'); ?>
                        				<div class="input-group">
                            				<div class="input-group-addon"><i class="fa fa-clock-o"></i></div>
                            				<?php echo form_input(['name'=>'class_start_time','class'=>'form-control timepicker','placeholder'=>'Enter class Start Time',
                            				    'value'=>set_value('class_start_time',date("g:i a", strtotime($lists->class_start_time)))]);?>
        								</div><!--  -->
                                    </div>
                                </div>
                            </div>
                             <?php */?>     
                        </div>
                       
                        <?php /*?>
                        <div class="col-sm-12">
                        	   <div class="col-md-3">
                                <div class="form-group">
    								<?php echo form_label('Duration in Hours *','class_duration',['for'=>'presenter_type']);?><?php echo form_error('class_duration'); ?>
                    				<?php  $course_duration  = array(''=>"Select Course Duration",
                                            '15'=>'15 Min','30'=>'30 Min','45'=>'45 Min','60'=>'1 Hour',
                                            '75'=>'1 Hour 15 min','90'=>'1 Hour 30 min','105'=>'1 Hour 45 min',
                                            '120'=>'2 Hour','135'=>'2 Hour 15 min','150'=>'2 Hour 30 min','165'=>'2 Hour 45 min',
                                            '180'=>'3 Hour','195'=>'3 Hour 15 min','210'=>'3 Hour 30 min','225'=>'3 Hour 45 min',
                                            '240'=>'4 Hour','255'=>'4 Hour 15 min','270'=>'4 Hour 30 min','285'=>'4 Hour 45 min',
                                            '300'=>'5 Hour');$options=array(''=>'Select Presenter','0'=>'Dummy','1'=>'Real');  ?>
                  					<?php echo form_dropdown('class_duration',$course_duration,set_value('class_duration',$lists->class_duration_min),['class'=>'form-control']);?>
                                </div>	
                            </div>	
                            <div class="col-md-3">
                                <div class="form-group">
    								<?php echo form_label('Extend Duration Mins','extend_duration',['for'=>'extend_duration']);?><?php echo form_error('extend_duration'); ?>
                    				<?php  $extend_duration  = array(''=>"Select Extend Duration",'05'=>'05 Min','10'=>'10 Min','15'=>'15 Min',
                                                '20'=>'20 Min','25'=>'25 Min','30'=>'30 min');?>
                    				<?php echo form_dropdown('extend_duration',$extend_duration,set_value('extend_duration',$lists->class_extend_time_min),['class'=>'form-control']);?>
                                </div>
                            </div> 
                            <div class="col-md-4">
                                <div class="form-group">
    								<?php echo form_label('Faculty *','faculty',['for'=>'faculty']);?><?php echo form_error('faculty'); ?>
                    				<?php echo form_dropdown('faculty',$faculty,set_value('faculty',$lists->faculty_code),['class'=>'form-control']);?>
                                </div>	
                            </div>	
                            <div class="col-md-2">
                                <div class="form-group">
    								<?php echo form_label('Per class basic Amount *','per_class_amount',['for'=>'per_class_amount']);?><?php echo form_error('per_class_amount'); ?>
                    				 <div class="input-group">
                        				 <div class="input-group-addon"><i class="fa fa-fw fa-rupee"></i></div>
                        				 <?php echo form_input(['name'=>'per_class_amount','class'=>'form-control','id'=>'','placeholder'=>'Enter Per class Amount Basic',
                        				     'value'=>set_value('per_class_amount',$lists->per_class_amount)]);?>
                                    </div>
                                </div>
                            </div>
                              
                        </div>
                        <?php */?>
                    </div>
                </div>
<hr />
<?php echo form_submit(['name'=>'save','value'=>'Save','class'=>'btn btn-default pull-right','style'=>'margin-left:5px;background-color: #ffffff;']); ?>
<?php echo  form_close();?>
</div>
</div>
</div>
</section>
</div>
<script>
$(document).ready(function(){
	$(".addCF").click(function(){
		$("#customFields").append('<tr valign="top"><th scope="row"><label for="customFieldName">Custom Field</label></th><td><input type="text" class="code" id="customFieldName" name="customFieldName[]" value="" placeholder="Input Name" /> &nbsp; <input type="text" class="code" id="customFieldValue" name="customFieldValue[]" value="" placeholder="Input Value" /> &nbsp; <a href="javascript:void(0);" class="remCF">Remove</a></td></tr>');
	});
    $("#customFields").on('click','.remCF',function(){
        $(this).parent().parent().remove();
    });
});
</script>
<style>
.SumoSelect {
    display: block;
    position: relative;
    outline: none;
}

</style>
<script>$('#mdp-demo').multiDatesPicker();</script>