<?php $__env->startSection('title'); ?>
    Link User
<?php $__env->stopSection(); ?>

<?php $__env->startSection('styles'); ?>

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

<?php $__env->startSection('content'); ?>

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

	<h1>Link <?php echo $user->name; ?> to companies</h1>

 <?php echo Form::model($user, array('route' => ['users.link-user', $user->id], 'files' => true)); ?>

    <div class="row">
         <div class="col-md-6">
            <label><i class="fa fa-user" aria-hidden="true"></i>Full Name <small class="red"><?php echo $errors->first('name'); ?></small></label>
             <?php echo $user->name; ?>

         </div>
         <div class="col-md-6">
            <label><i class="fa fa-envelope" aria-hidden="true"></i> Email <small class="red"><?php echo $errors->first('email'); ?></small></label>
            <?php echo $user->email; ?>

         </div>
    </div>

    <hr>

    <div class="row">
        <div class="large-4 columns">
            <p></p>
        </div>
        <div class="large-4 columns">
        <p style="font-size: 1.7rem;">Companies</p>
            <?php foreach($companies as $company): ?>
            <input id="<?php echo $company->id; ?>" type="checkbox" name="companies[]" value="<?php echo $company->companyName; ?>"><label style="font-size: 1.1rem;" class="" for="<?php echo $company->id; ?>"><?php echo $company->companyName; ?></label><br>
            <?php endforeach; ?>
        </div>
        <div class="large-4 columns">
            <p></p>
        </div>
    </div>

    <hr>

   <button style="display:block;margin-left: auto;margin-right:auto;" class="myButton" type="submit">Link User to Selected Companies</button>

<?php echo Form::close(); ?>

<hr>

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






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