<?php $__env->startSection('content'); ?>
	<h2>Edit picture</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($picture, array('route' => array('admin.galleries.update', $picture->picture_id), 'method' => 'PUT', 'files' => true, 'class' => 'form-horizontal')); ?>
		<?php echo Form::hidden('neighborhood_id', $neighborhood->neighborhood_id); ?>
  		<div class="form-group">
    		<label for="input-file" class="col-lg-2 control-label">Select a File *</label>     		
     		<div class="col-lg-10">
     			<p><img src="<?php echo Image::url($picture->file_name, $picture->file_path, 'thumb'); ?>" alt="" /></p>     			
     			
     			<strong>Upload new file to replace existing one</strong><br /> 
     			<?php echo Form::file('file', array('id' => 'input-file', 'placeholder' => 'File')); ?>  
     		</div>
  		</div>
  		<div class="form-group">
    		<label for="input-title" class="col-lg-2 control-label">Title *</label>
    		<div class="col-lg-10"> <?php echo Form::text('title', $picture->title, array('id' => 'input-title', 'placeholder' => 'Picture Title', 'required' => 'true', 'class' => 'form-control')); ?>   </div>  		
  		</div>
  		<div class="form-group">
    		<label for="input-description" class="col-lg-2 control-label">Description</label>    
    		<div class="col-lg-10"> 		
     		<?php echo Form::textarea('description', $picture->description, array('id' => 'input-description', 'placeholder' => 'Description', 'class' => 'form-control', 'rows' => 5)); ?>
     		</div>  
  		</div>  	
  		<div class="form-group">
    		<label for="input-sort_order" class="col-lg-2 control-label">Sort Order</label>
    		<div class="col-lg-10"> <?php echo Form::text('sort_order', $picture->sort_order, array('id' => 'input-sort_order', 'placeholder' => 'Sort Order', 'class' => 'form-control')); ?>   </div>  		
  		</div>
  		<div class="form-group">
    		<label for="input-is_cover" class="col-lg-2 control-label">Cover Image *</label>
    		<div class="col-lg-10"> <?php echo Form::select('is_cover', array('1' => 'Yes', '0' => 'No'),  $picture->neighborhood()->first()->pivot->is_cover, array('id' => 'input-is_cover', 'class' => 'form-control')); ?>     	</div>	
  		</div>	
  		<div class="form-group">
    		<label for="input-is_active" class="col-lg-2 control-label">Is active *</label>
    		<div class="col-lg-10"> <?php echo Form::select('is_active', array('1' => 'Yes', '0' => 'No'), $picture->is_active, array('id' => 'input-is_active', 'class' => 'form-control')); ?>     	</div>	
  		</div>

  		<div class="form-group">
  			<button class="col-lg-offset-2 btn btn-primary">Save</button>
  			<a href="<?php echo URL::to('admin/galleries?neighborhood_id='.$neighborhood->neighborhood_id); ?>" class="btn btn-link">Cancel</a>
  		</div>
  		
	<?php echo Form::close(); ?>
	
<?php $__env->stopSection(); ?>