<?php $__env->startSection('content'); ?>
    <div class="panel panel-primary">
        <div class="panel-heading">Vytvořte Vaše ubytování</div>
        <div class="panel-body">
            <?php echo $__env->make('flash::message', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
            <?php echo e(Form::open(['route' => 'storeAccommodation', 'class' => 'form-horizontal', 'files' => true, 'enctype'=>'multipart/form-data'])); ?>


            <div class="form-group<?php echo e($errors->has('accommodation_name') ? ' has-error' : ''); ?>">
                <label class="col-md-4 control-label">Název ubytování</label>

                <div class="col-md-6">
                    <?php echo e(Form::text('accommodation_name', null,  ['class' => 'form-control'])); ?><?php if($errors->has('accommodation_name')): ?>
                        <span class="help-block">
                            <strong><?php echo e($errors->first('accommodation_name')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>
            </div>

            <div class="form-group<?php echo e($errors->has('accommodation_description') ? ' has-error' : ''); ?>">
                <label class="col-md-4 control-label">Popis</label>

                <div class="col-md-6">
                    <?php echo e(Form::textarea('accommodation_description', null,  ['size' => '30x5', 'class' => 'form-control'])); ?> <?php if($errors->has('accommodation_description')): ?>
                        <span class="help-block">
                            <strong><?php echo e($errors->first('accommodation_description')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>
            </div>

            <div class="form-group<?php echo e($errors->has('website') ? ' has-error' : ''); ?>">
                <label class="col-md-4 control-label">Webová stránka ubytování</label>

                <div class="col-md-6">
                    <?php echo e(Form::text('website', null,  ['class' => 'form-control'])); ?> <?php if($errors->has('website')): ?>
                        <span class="help-block">
                            <strong><?php echo e($errors->first('website')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>
            </div>

            <div class="form-group<?php echo e($errors->has('accommodation_email') ? ' has-error' : ''); ?>">
                <label class="col-md-4 control-label">E-mail ubytování</label>

                <div class="col-md-6">
                    <?php echo e(Form::text('accommodation_email', null,  ['class' => 'form-control'])); ?> <?php if($errors->has('accommodation_email')): ?>
                        <span class="help-block">
                            <strong><?php echo e($errors->first('accommodation_email')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>
            </div>

            <div class="form-group<?php echo e($errors->has('accommodation_phone_number') ? ' has-error' : ''); ?>">
                <label class="col-md-4 control-label">Telefon ubytování</label>

                <div class="col-md-6">
                    <?php echo e(Form::text('accommodation_phone_number', null,  ['class' => 'form-control'])); ?> <?php if($errors->has('accommodation_phone_number')): ?>
                        <span class="help-block">
                            <strong><?php echo e($errors->first('accommodation_phone_number')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>
            </div>

            <div class="form-group">
                <label class="col-md-4 control-label">Vybavení ubytování</label>

                <div class="col-md-6">
                    <table>
                        <?php $__currentLoopData = $equipment; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $equip): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td class="td_width"><?php echo e($equip->equipment_name); ?></td>
                                <td><?php echo e(Form::checkbox('equip[]', $equip->equipment_id, false)); ?>

                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </table>

                </div>
            </div>

            <div class="form-group<?php echo e($errors->has('town') ? ' has-error' : ''); ?>">
                <label class="col-md-4 control-label">Město</label>

                <div class="col-md-6">

                    <?php echo e(Form::text('town', null,  ['class' => 'form-control'])); ?>  <?php if($errors->has('town')): ?>
                        <span class="help-block">
                            <strong><?php echo e($errors->first('town')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>
            </div>

            <div class="form-group<?php echo e($errors->has('street_name') ? ' has-error' : ''); ?>">
                <label class="col-md-4 control-label">Ulice</label>

                <div class="col-md-6">

                    <?php echo e(Form::text('street_name', null,  ['class' => 'form-control'])); ?> <?php if($errors->has('street_name')): ?>
                        <span class="help-block">
                            <strong><?php echo e($errors->first('street_name')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>
            </div>

            <div class="form-group<?php echo e($errors->has('street_number') ? ' has-error' : ''); ?>">
                <label class="col-md-4 control-label">Číslo domu</label>
                <div class="col-md-6">

                    <?php echo e(Form::text('street_number', null,  ['class' => 'form-control'])); ?>  <?php if($errors->has('street_number')): ?>
                        <span class="help-block">
                            <strong><?php echo e($errors->first('street_number')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>
            </div>


            <div class="form-group<?php echo e($errors->has('image') ? ' has-error' : ''); ?>">
                <label class="col-md-4 control-label">Titulní obrázek</label>
                <div class="col-md-6">

                    <?php echo e(Form::file('image', ['enctype' => 'multipart/form-data', 'class' => 'form-control'])); ?>  <?php if($errors->has('image')): ?>
                        <span class="help-block">
                            <strong><?php echo e($errors->first('image')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>
            </div>

            <div class="form-group">
                <div class="col-md-6 col-md-offset-4">
                    <?php echo e(Form::submit('Vytvořit', array('class'=>'btn btn-primary'))); ?>

                </div>
            </div>

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

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

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