
<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="col-xs-12 col-sm-12">
        <div class="box">
            <div class="box-content my_content">
                 <?php if($errors->has()): ?>
                    <div class="alert alert-danger">
                        <?php foreach($errors->all() as $error): ?>
                            <?php echo $error; ?><br>        
                        <?php endforeach; ?>
                    </div>
                <?php endif; ?>
                <h5 class="page-header"><b>
                        Source 
                    <?php if(isset($source_to_edit)): ?>
                        Update
                    <?php else: ?>
                        Entry 
                    <?php endif; ?> 
                        Form
                </b></h5>
                <?php if(isset($source_to_edit)): ?>    
                    <?php echo Form::open(array('class' => 'form-horizontal','role' => 'form','action' => 'SourceController@update','method' => 'POST','accept-charset' => 'ISO-8859-1')); ?> 
                <?php else: ?>
                    <?php echo Form::open(array('class' => 'form-horizontal','role' => 'form','action' => 'SourceController@store','method' => 'POST','accept-charset' => 'ISO-8859-1')); ?>          
                <?php endif; ?> 
                <div class="form-group">  
                        <?php echo Form::label('name', 'Name', array('class' => 'col-sm-2 control-label')); ?>

                    <div class="col-sm-4">
                        <?php if(isset($source_to_edit)): ?>
                        <?php echo Form::text('source_name',$source_to_edit->source_name,['required'=>'required','class'=>'form-control']); ?>

                        <?php echo Form::hidden('source_id',$source_to_edit->id,['required']); ?>

                        <?php else: ?>
                        <?php echo Form::text('source_name','',['required'=>'required','class'=>'form-control']); ?> 
                        <?php endif; ?> 
                    </div>                        
                    <div class="col-sm-4"></div>
                </div>        
                    
                <div class="form-group">                            
                    <div class="col-sm-4"></div>
                    <div class="col-sm-4">
                        <?php if(isset($source_to_edit)): ?>
                        <?php echo Form::submit('Update', array('class' => 'btn btn-primary btn-label-left')); ?>

                        <?php else: ?>                           
                        <?php echo Form::submit('Save', array('class' => 'btn btn-primary btn-label-left')); ?>

                        <?php endif; ?> 
                    </div>
                </div>                    
                <?php echo Form::close(); ?>                
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout.default', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>