<?php $__env->startSection('content'); ?>
    <div class="panel panel-primary">
        <div class="panel-heading">Vytvořte pokoj ve Vašem ubytování</div>
        <div class="panel-body">
            <?php if($accommodation != null): ?>

                <?php echo e(Form::open(['route' => 'storeRoom', 'class' => 'form-horizontal', 'files' => true, 'enctype'=>'multipart/form-data'])); ?>


                <div class="form-group<?php echo e($errors->has('room_name') ? ' has-error' : ''); ?>">
                    <label class="col-md-4 control-label">Název pokoje</label>
                    <div class="col-md-6">
                        <?php echo e(Form::text('room_name', null,  ['class' => 'form-control'])); ?> <?php if($errors->has('room_name')): ?>
                            <span class="help-block">
                                <strong><?php echo e($errors->first('room_name')); ?></strong>
                            </span>
                        <?php endif; ?>
                    </div>
                </div>

                <div class="form-group<?php echo e($errors->has('beds') ? ' has-error' : ''); ?>">
                    <label class="col-md-4 control-label">Počet lůžek</label>
                    <div class="col-md-6">
                        <?php echo e(Form::text('beds', null,  ['class' => 'form-control'])); ?>  <?php if($errors->has('beds')): ?>
                            <span class="help-block">
                                <strong><?php echo e($errors->first('beds')); ?></strong>
                            </span>
                        <?php endif; ?>
                    </div>
                </div>

                <div class="form-group<?php echo e($errors->has('price') ? ' has-error' : ''); ?>">
                    <label class="col-md-4 control-label">Cena za lůžko a noc [Kč]</label>
                    <div class="col-md-6">
                        <?php echo e(Form::text('price', null,  ['class' => 'form-control'])); ?>  <?php if($errors->has('price')): ?>
                            <span class="help-block">
                                <strong><?php echo e($errors->first('price')); ?></strong>
                            </span>
                        <?php endif; ?>
                    </div>
                </div>


                <div class="form-group">
                    <label class="col-md-4 control-label">Typ ubytování</label>
                    <div class="col-lg-6">
                        <?php echo e(Form::select('select', ['pokoj' => 'pokoj', 'apartman' => 'apartmán'],  null, ['class' => 'form-control' ])); ?>

                    </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 pokoj', array('class'=>'btn btn-primary'))); ?>

                    </div>
                </div>

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

            <?php else: ?>
                <div class="panel-warning">Nemáš vytvořeno ubytování. Pokoje můžeš vytvářet až po vytvoření ubytování</div>
            <?php endif; ?>
        </div>
    </div>
<?php $__env->stopSection(); ?>

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