<?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/report')); ?>">Report 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>
			
			<div class="tab_name">
				<a href="<?php echo e(URL('/admin/reportType')); ?>" class="">Report Type</a>
				<a href="<?php echo e(URL('/admin/reportCategory')); ?>" class="">Report Category</a>
				<a href="<?php echo e(URL('/admin/report')); ?>" class="active">Report</a>
			</div><!--tab_name-->
			<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/report/store')); ?>" method="POST" onsubmit="return form_check();" class="form-horizontal" enctype="multipart/form-data">
			
              <div class="control-group">
                <label class="control-label">Category <span style="color:#FF0000;">*</span></label>
                <div class="controls">
				  <select name="cat_id" id="cat_id" class="span5">
					<?php foreach( $category_list as $category ):?>
						<option value="<?php echo e($category->id); ?>" <?php echo isset($object->cat_id) && $object->cat_id==$category->id? ' selected="selected"': '';?>><?php echo e($category->title); ?> ( <?php echo isset($type_names[$category->type_id]) ? $type_names[$category->type_id]: '';?> )</option>
					<?php endforeach;?>
				</select>
                </div>
              </div>
			  <div class="control-group">
                <label class="control-label">Year <span style="color:#FF0000;">*</span></label>
                <div class="controls">
				  <select name="year" id="year" class="span5">
					<?php foreach( $year_list as $year ):?>
						<option value="<?php echo e($year); ?>" <?php echo isset($object->year) && $object->year==$year? ' selected="selected"': '';?>><?php echo e($year); ?></option>
					<?php endforeach;?>
				</select>
                </div>
              </div>
			
              <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">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,'');"  placeholder="Number Only" />
                </div>
			  </div>
			  
              <div class="control-group">
                <label class="control-label">Quarter 1 </label>
                <div class="controls">
                  <input type="file" name="documents_1[]" id="document_1" value="">  Please note that the file should be zip, pdf, excel file. <br />
				  <input type="text" name="imageid_1" id="imageid_1" size="10" value="" onkeyup="value=value.replace(/[^\d-]/g,'');"/>Link to a document, Media ID (Please retrieve ID from Document Center, Set -1 will delete previous) <br />
				  <?php echo isset($object->quarter_1_path) ? $object->quarter_1_path : NULL?>
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">Quarter 2 </label>
                <div class="controls">
                  <input type="file" name="documents_2[]" id="document_2" value="">  Please note that the file should be zip, pdf, excel file. <br />
				  <input type="text" name="imageid_2" id="imageid_2" size="10" value="" onkeyup="value=value.replace(/[^\d-]/g,'');"/>Link to a document, Media ID (Please retrieve ID from Document Center, Set -1 will delete previous) <br />
				  <?php echo isset($object->quarter_2_path) ? $object->quarter_2_path : NULL?>
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">Quarter 3 </label>
                <div class="controls">
                  <input type="file" name="documents_3[]" id="document_3" value="">  Please note that the file should be zip, pdf, excel file. <br />
				  <input type="text" name="imageid_3" id="imageid_3" size="10" value="" onkeyup="value=value.replace(/[^\d-]/g,'');"/>Link to a document, Media ID (Please retrieve ID from Document Center, Set -1 will delete previous) <br />
				  <?php echo isset($object->quarter_3_path) ? $object->quarter_3_path : NULL?>
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">Quarter 4 </label>
                <div class="controls">
                  <input type="file" name="documents_4[]" id="document_4" value="">  Please note that the file should be zip, pdf, excel file. <br />
				  <input type="text" name="imageid_4" id="imageid_4" size="10" value="" onkeyup="value=value.replace(/[^\d-]/g,'');"/>Link to a document, Media ID (Please retrieve ID from Document Center, Set -1 will delete previous) <br />
				  <?php echo isset($object->quarter_4_path) ? $object->quarter_4_path : NULL?>
                </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(); ?>