<div id="ulp_drip_content_meta_box" >

<div class="ulp-inside-item">

  <div class="row">

   <div class="col-xs-6">

   <h3><?php _e('Lesson Drip Content', 'ulp');?></h3>

	<div style="margin-top:15px;">

		<!--label for="tag-showup" style="font-weight:bold; margin:15px 0; "><?php _e('Enable:', 'ulp');?></label-->

		<label class="ulp_label_shiwtch" style="margin:10px 0 10px -10px;">

			<?php $checked = ($data['metas']['ulp_drip_content'] == 1) ? 'checked' : '';?>

			<input type="checkbox" class="ulp-switch" onClick="ulpCheckAndH(this, '#ulp_drip_content_field_hidden');" <?php echo $checked;?> />

			<div class="switch" style="display:inline-block;"></div>

		</label>

		<input type="hidden" value="<?php echo $data['metas']['ulp_drip_content'];?>" name="ulp_drip_content" id="ulp_drip_content_field_hidden" />

	</div>





  <div>

   <p><?php _e("Release content at regular intervals, by creating a release schedule for your content.", 'ulp')?></p>

  </div>





  <div style="margin-top: 10px; padding-top: 5px;">

    <h4 class="ulp-meta-drip-subtitle"><?php _e("Release Time", 'ulp')?></h4>

    <div style="margin: 15px 0px;">

        <div style="  max-width: 400px;  margin-bottom:20px;">

            <div class="title-select"><?php _e('Type:', 'ulp');?></div>

            <select name="ulp_drip_start_type"  class="form-control m-bot15" onchange="ulpShowSelectorIf('#after_x_time', this.value, 1);ulpShowSelectorIf('#specific_date', this.value, 2);">

                    <?php foreach ([1=>__('After Enroll X time', 'ulp'), 2 => __('On specific date', 'ulp')] as $k=>$v):?>

                            <option value="<?php echo $k;?>" <?php if ($k==$data['metas']['ulp_drip_start_type']) echo 'selected';?> ><?php echo $v;?></option>

                    <?php endforeach;?>

            </select>

        </div>



        <div class="ulp_drip_pickperiod" id="after_x_time" style="margin-bottom:10px;">



          <div class="title-select"><?php _e('After Enroll:', 'ulp');?></div>

           <div class="row" style="max-width:400px;">

   			       <div class="col-xs-6" style="padding:0px;">

          		     <input type="number" min="0" value="<?php echo $data['metas']['ulp_drip_start_numeric_value'];?>" name="ulp_drip_start_numeric_value" class="form-control"  />

               </div>

             <div class="col-xs-6" style="padding:0px;">

            		<select name="ulp_drip_start_numeric_type" style="vertical-align: top !important;" class="form-control m-bot15"><?php

  				          foreach (array('days'=>'Days', 'weeks'=>'Weeks', 'months'=>'Months') as $k=>$v){

  					        ?>

  					              <option value="<?php echo $k;?>" <?php if ($data['metas']['ulp_drip_start_numeric_type']==$k) echo 'selected';?> ><?php echo $v;?></option>

  					        <?php }

  				      ?></select>

             </div>

          </div>



          </div>



          <div class="ulp_drip_pickdate" id="specific_date" style="margin-bottom:10px;">

            <div class="input-group" style="  max-width: 400px;">

               <span class="input-group-addon"> <?php _e('On Specific Date:', 'ulp');?></span>

              <input type="text" class="form-control" value="<?php echo $data['metas']['ulp_drip_start_certain_date'];?>" name="ulp_drip_start_certain_date" id="ulp_drip_start_certain_date"/>

            </div>

           <div style="font-size:11px; color:#999; font-style:italic"><?php _e('Pick the desired date when the Page will be available', 'ulp');?></div>

          </div>



      </div>

      <div class="ulp-clear"></div>

    </div>

  </div>

 </div>

 </div>

 </div>



<div class="ulp-clear"></div>

<script>

jQuery(document).ready(function() {

	jQuery('#ulp_drip_start_certain_date').datepicker({

		dateFormat : 'dd-mm-yy',

		onClose: function( selectedDate ){

			jQuery( "#ihc_drip_end_certain_date" ).datepicker( "option", "minDate", selectedDate );

			}

	});

  ulpShowSelectorIf('#after_x_time', <?php echo $data['metas']['ulp_drip_start_type'];?>, 1);

  ulpShowSelectorIf('#specific_date', <?php echo $data['metas']['ulp_drip_start_type'];?>, 2);

});

</script>

