<?php $__env->startSection('content'); ?>
<div class="container-fluid">
	<div class="row">
		<div class="col-md-8 col-md-offset-2">
			<h1>Edit Project <small> <?php echo e($projects[0]['proj_title']); ?></small></h1>
    <ul class='breadcrumb'>
        <li><a href="<?php echo e(URL('admin/dashboard')); ?>">Home</a></li>
        <li><a href="<?php echo e(URL('admin/projects')); ?>">Projects</a></li>
        <li>Edit</li>
    </ul>
			<div class="panel panel-default">
			
				<div class="panel-body">
					<?php if(count($errors) > 0): ?>
						<div class="alert alert-danger">
							<strong>Whoops!</strong> There were some problems with your input.<br><br>
							<ul>
								<?php foreach($errors->all() as $error): ?>
									<li><?php echo e($error); ?></li>
								<?php endforeach; ?>
							</ul>
						</div>
					<?php endif; ?>

				 <?php if(Session::has('message')): ?>
						<div class="alert alert-success">
							<strong>Status!</strong>  <?php echo e(Session('message')); ?> 
        				</div>
					<?php endif; ?>


<?php if(count($projects) > 0): ?>
<?php foreach($projects as $project): ?>
<form class="form-horizontal" role="form" method="POST">
						<input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
						<input type="hidden" name="id" value="<?php echo e($project->id); ?> ">
<legend>Project Specs</legend>
						<div class="form-group">
							<label class="col-md-4 control-label">Project Title*</label>
							<div class="col-md-6">
								<input type="text" class="form-control" name="title" value="<?php echo e($project->proj_title); ?>">
							</div>
						</div>

						<div class="form-group">
							<label class="col-md-4 control-label">Project Specification*</label>
							<div class="col-md-6">
								<input type="text" class="form-control" name="description" value="<?php echo e($project->proj_desc); ?>" >
							</div>
						</div>
<legend>Schedule</legend>
						<div class="form-group">
							<label class="col-md-4 control-label">Project Date*</label>
							<div class="col-md-6">
                            <div class='input-group date'>
<input type='text' class="form-control" id="date-start" name="start_date" data-provide="datepicker" value="<?php echo e($project->start_date); ?>" />
  <span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span></div>

							</div>
						</div>
						<div class="form-group">
							<label class="col-md-4 control-label">Deadline Date*</label>
							<div class="col-md-6">
                            <div class='input-group date'>
<input type='text' class="form-control" id="date-end" name="deadline" data-provide="datepicker" value="<?php echo e($project->deadline); ?>" />
  <span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span></div>

							</div>
						</div>
						<div class="form-group">	
							<label class="col-md-4 control-label">Status*</label>
							<div class="col-md-6">
								<select class="form-control" name="status" id="status">
<?PHP if($project->status=='0') echo 'selected'; ?>
									<option value="0" <?PHP if($project->status=='0') echo 'selected'; ?>>On Going</option>
									<option value="1" <?PHP if($project->status=='1') echo 'selected'; ?>>Finished</option>
									<option value="2" <?PHP if($project->status=='2') echo 'selected'; ?>>Stopped</option>
								</select>
							</div>
						</div>						
                        	
						<div class="form-group">
							<div class="col-md-6 col-md-offset-4">
								<button type="submit" class="btn btn-primary" disabled>
								   Save Project
								</button>
							</div>
						</div>
					</form>
<?php endforeach; ?>
<?php endif; ?>										

				</div>
			</div>
		</div>
	</div>
</div>
<?php $__env->stopSection(); ?>

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