<?php $__env->startSection('content'); ?>
    <div class="panel panel-primary">
        <div class="panel-heading">Vytvořte rezervaci pokoje: <?php echo e($room->room_name); ?> (<?php echo e($accommodation); ?>)</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' => 'createReservation', 'class' => 'form-horizontal'])); ?>


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

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

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

            <!-- TELEPHONE NUMBER -->
            <div class="form-group<?php echo e($errors->has('phone_number') ? ' has-error' : ''); ?>">
                <label class="col-md-4 control-label">Telefonní číslo</label>
                <div class="col-md-6">
                    <?php echo e(Form::text('phone_number', null, ['class' => 'form-control'])); ?> <?php if($errors->has('phone_number')): ?>
                        <span class="help-block">
                            <strong><?php echo e($errors->first('phone_number')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>
            </div>

            <hr>

            <div class="form-group<?php echo e($errors->has('date_start') ? ' has-error' : ''); ?>">
                <label class="col-md-4 control-label">Datum od</label>
                <div class="col-md-6">
                    <?php echo e(Form::date('date_start', $date_start,  ['class' => 'form-control'])); ?> <?php if($errors->has('date_start')): ?>
                        <span class="help-block">
                            <strong><?php echo e($errors->first('date_start')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>
            </div>

            <div class="form-group<?php echo e($errors->has('date_end') ? ' has-error' : ''); ?>">
                <label class="col-md-4 control-label">Datum do</label>
                <div class="col-md-6">
                    <?php echo e(Form::date('date_end', $date_end,  ['class' => 'form-control'])); ?> <?php if($errors->has('date_end')): ?>
                        <span class="help-block">
                            <strong><?php echo e($errors->first('date_end')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>
            </div>

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

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


            <?php echo e(Form::hidden('room_id', $room->room_id)); ?>


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

                </div>
            </div>

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


            <div class="panel panel-info">
                <div class="panel panel-body">
                    <div class="smaller_size">
                        Rezervace jsou pouze předběžné a je nutné je potvrdit na e-mailu konkrétního ubytování do dvou dnů od vytvoření rezervace. Správci ubytování Vám poté Vaši rezervaci potvrdí.
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

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