<?php $__env->startSection('content'); ?>
    <div class="panel panel-primary">
        <div class="panel-heading">Vytvořte recenzi ubytování: <?php echo e($accommodation->accommodation_name); ?></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(['url'=>['reviews_list/'.$accommodation->accommodation_id],'method'=>'post', 'class' => 'form-horizontal'])); ?>

            Recenzi mohou vytvořit pouze osoby, které byli v daném zařízení ubytovány. Kontrola se provádí pomocí e-mailu.

            <!-- EMAIL -->
            <?php echo e(Form::hidden('accommodation_id',$accommodation->accommodation_id)); ?>

            <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>

            <!-- REVIEW -->
            <div class="form-group<?php echo e($errors->has('review') ? ' has-error' : ''); ?>">
                <label class="col-md-4 control-label">Vaše recenze</label>
                <div class="col-md-6">
                    <?php echo e(Form::textarea('review', null,  ['size' => '30x5', 'class' => 'form-control'])); ?> <?php if($errors->has('review')): ?>
                        <span class="help-block">
                            <strong><?php echo e($errors->first('review')); ?></strong>
                        </span>
                    <?php endif; ?>
                </div>
            </div>

            <div class="form-group<?php echo e($errors->has('rating') ? ' has-error' : ''); ?>">
                <label class="col-md-4 control-label">Celkové hodnocení (5 - nejlepší)</label>
                <div class="col-md-6">
                    <?php echo e(Form::selectRange('rating', 1, 5, 1, ['class' => 'form-control float_right'])); ?> <?php if($errors->has('rating')): ?>
                        <span class="help-block">
                            <strong><?php echo e($errors->first('rating')); ?></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 recenzi', 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(); ?>