<?php $__env->startSection('content'); ?>
	<p class="head_inner_nav">
        <a href="<?php echo URL::to('admin/team'); ?>">Team</a><span>></span><?php echo $title; ?>
    </p> 
	<h2><?php echo $title; ?></h2>
	
	<?php if($errors->has()): ?>
		<div class="alert alert-danger">
		<?php foreach ($errors->all() as $row): ?>
	      <div><?php echo $row; ?></div>
	  	<?php endforeach; ?>
	  	</div>
	<?php endif; ?>
	
	<?php echo Form::model($team, $method); ?>
  		<div class="form-group">
  			<button class="btn btn-primary">Save</button>
  			<a href="<?php echo URL::to('admin/team'); ?>" class="btn btn-link">Cancel</a>
  		</div>
      	<div class="form-group">
            <label for="input-name" class="control-label">Name</label>
            <?php echo Form::text('name', null, array('id' => 'input-name', 'placeholder' => 'Name', 'required' => 'true', 'class' => 'form-control')); ?>     		
        </div>
        <div class="form-group">
            <label for="input-position" class="control-label">Position</label>
            <?php echo Form::text('position', null, array('id' => 'input-position', 'placeholder' => 'Position', 'class' => 'form-control')); ?>     		
        </div>
        <div class="form-group">
            <label for="redactor" class="control-label">Description</label>     		
            <?php echo Form::textarea('description', null, array('id' => 'redactor', 'placeholder' => 'Description', 'required' => 'true', 'class' => 'form-control')); ?>  
        </div> 
        <div class="form-group">
    		<label for="input-name" class="control-label">Photo</label>
    		<?php if(!empty($team->photo) && file_exists(public_path().'/uploads/team/'.$team->photo)): ?>
            <img src="<?php echo asset('uploads/team/'.$team->photo); ?>" width="100" />
            <?php else: ?>
            	<?php echo Form::file('photo');; ?>
  			<?php endif; ?>
        </div>
        <?php if(!empty($team->photo) && file_exists(public_path().'/uploads/team/'.$team->photo)): ?>
       	<div class="form-group">
    		<label for="input-name" class="control-label">New Photo</label>
        	<?php echo Form::file('photo');; ?>
        </div>
        <?php endif; ?> 		
     	<div class="form-group">
            <label for="input-sort" class="control-label">Sort</label>
            <?php echo Form::text('sort', null, array('id' => 'input-sort', 'placeholder' => 'Sort', 'class' => 'form-control')); ?>     		
        </div>
  		<div class="form-group">
    		<label for="input-is_active" class="control-label">Is active</label>
    		<?php echo Form::select('is_active', array('1' => 'Yes', '0' => 'No'), null, array('id' => 'input-is_active', 'class' => 'form-control')); ?>     		
  		</div>
  		<div class="form-group">
  			<button class="btn btn-primary">Save</button>
  			<a href="<?php echo URL::to('admin/team'); ?>" class="btn btn-link">Cancel</a>
  		</div>
	<?php echo Form::close(); ?>
	
<?php $__env->stopSection(); ?>