<?php $__env->startSection('content'); ?>

<script language="javascript" type="text/javascript">
var editor;
KindEditor.ready(function(K) {
	editor = K.create('#content_wysiwyg', {		
		langType : 'en',
		newlineTag : 'br',		//p, br
		resizeType : 2,
		allowFileManager : true,
		afterBlur: function(){this.sync();}
	});
});
</script>

  <div id="content-header">
    <div id="breadcrumb"> <a href="<?php echo e(url('/admin')); ?>" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> Home</a> <a href="<?php echo e(url('/admin/event')); ?>">Event Management</a> <a href="javascript:void(0);" class="current">Add/Edit</a> </div>
  </div>
  
  
  <div class="container-fluid">
    <div class="row-fluid">
      <div class="span12">
        <div class="widget-box">
	  	
			<div class="title_btn">
				<h2><?php echo $pk_id>0? 'Edit': 'Add New';?></h2>
			</div>
			<div class="clear"></div>
			
			<?php echo parseErrorMessageLaravel($errors);?>
			  
          <div class="widget-content nopadding">
			<form name="my_add_form" id="my_add_form" action="<?php echo e(URL('admin/event/store')); ?>" method="POST" onsubmit="return form_check();" class="form-horizontal">
			
              <div class="control-group">
                <label class="control-label">Title <span style="color:#FF0000;">*</span></label>
                <div class="controls">
				  <input type="text" name="title" id="title" maxlength="255" class="span8 m-wrap" value="<?php echo isset($object->title) ? $object->title : NULL?>" required="required" placeholder="Title" />
                </div>
              </div>
			  
			  <div class="control-group">
                <label class="control-label">Location <span style="color:#FF0000;">*</span></label>
                <div class="controls">
				  <input type="text" name="location" id="location" maxlength="255" class="span8 m-wrap" value="<?php echo isset($object->location) ? $object->location : NULL?>" placeholder="Location" />
                </div>
              </div>
			  <div class="control-group">
                <label class="control-label">Start Date <span style="color:#FF0000;">*</span></label>
                <div class="controls">
				  <input type="text" name="start_date" id="start_date" data-date-format="yyyy-mm-dd" value="<?php echo isset($object->start_date) ? $object->start_date : NULL?>" class="datepicker span8">
				  <span class="help-block">Date with Formate of  (yyyy-mm-dd)</span>
                </div>
              </div>
			  <div class="control-group">
                <label class="control-label">End Date <span style="color:#FF0000;">*</span></label>
                <div class="controls">
				  <input type="text" name="end_date" id="end_date" data-date-format="yyyy-mm-dd" value="<?php echo isset($object->end_date) ? $object->end_date : NULL?>" class="datepicker span8">
				  <span class="help-block">Date with Formate of  (yyyy-mm-dd)</span>
                </div>
              </div>
<script language="javascript">
$(function() {
	$(".datepicker").datepicker({
		changeMonth: true,		//Allows you to change the month by selecting from a drop-down list.
		changeYear: true,		//Allows you to change the year by selecting from a drop-down list. 
		dateFormat: "yy-mm-dd",		//The format for parsed and displayed dates. 
		dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
		dayNamesMin: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
		dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
		firstDay: 1,		//Set the first day of the week: Sunday is 0, Monday is 1
		monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
		monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
		yearRange: "c-20:c+20",		//Control the range of years displayed in the year drop-down
		showButtonPanel: true,			//Whether to show the button panel.
	});
});
</script>

			  <div class="control-group">
                <label class="control-label">Link <span style="color:#FF0000;">*</span></label>
                <div class="controls">
				  <input type="text" name="link" id="link" maxlength="255" class="span8 m-wrap" value="<?php echo isset($object->link) ? $object->link : NULL?>" placeholder="Link" />
                </div>
              </div>
			  
			  
              <div class="control-group">
                <label class="control-label">Status <span style="color:#FF0000;">*</span></label>
                <div class="controls">
                  <label><input type="radio" name="status" id="status" value="Active" <?php echo isset($object->status) && $object->status=='Active' ? ' checked="checked"' : NULL?> />Active</label>
				  <label><input type="radio" name="status" id="status" value="Archive" <?php echo isset($object->status) ? ( $object->status=='Archive' ? ' checked="checked"': NULL) : ' checked="checked"'?> />Archive</label>
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">Sort <span style="color:#FF0000;">*</span></label>
                <div class="controls">
                  <input type="text" name="sort" id="sort" maxlength="255" value="<?php echo isset($object->sort) ? $object->sort : NULL?>" onkeyup="value=value.replace(/[^\d]/g,'');" required="required" placeholder="Number Only" />
                </div>
			  </div>
              <div class="control-group">
                <label class="control-label">Content <span style="color:#FF0000;">*</span></label>
                <div class="controls">
                  <textarea style="height:300px; width:700px;" name="content" id="content_wysiwyg" ><?php echo isset($object->content) ? $object->content : NULL?></textarea>
                </div>
              </div>
			  
			  
              <div class="form-actions">
			  	<input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
				<input type="hidden" name="pk_id" value="<?php echo isset($object->id) ? $object->id : 0?>" />
				
                <input type="submit" value="Save" class="btn btn-success">
				<input type="button" value="Cancel" class="btn btn-danger" onclick="javascript:history.go(-1);return false;" />
              </div>
            </form>
          </div>
        </div>
      </div>
    </div>
    
  </div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin_layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>