<?php $__env->startSection('content'); ?>
    <h3 class="page-title"><?php echo app('translator')->get('quickadmin.currencyRate.title_singular'); ?></h3>
    <div class="panel panel-default">
        <div class="panel-heading">
            <?php echo e(trans('quickadmin.qa_edit')); ?>

        </div>
        <div class="panel-body">
            <form method="POST" action="<?php echo e(route("admin.currency-rates.update", [$currencyRate->id])); ?>"
                  enctype="multipart/form-data">
                <?php echo method_field('PUT'); ?>
                <?php echo csrf_field(); ?>
                <div class="flex-row-align-top row">
                    <div class="form-group col-xs-12 col-lg-6">
                        <label class="required"
                               for="currency_from_id"><?php echo e(trans('quickadmin.currencyRate.fields.currency_from')); ?>

                            *</label>
                        
                        <select class="form-control select2" name="currency_from_id" id="currency_from_id" disabled>
                            <?php $__currentLoopData = $currency_froms; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $entry): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option
                                    value="<?php echo e($id); ?>" <?php echo e((old('currency_from_id') ? old('currency_from_id') : $currencyRate->currency_from->id ?? '') == $id ? 'selected' : ''); ?>><?php echo e($entry); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                        <?php echo Form::hidden('currency_from_id', old('currency_from_id') ? old('currency_from_id') : $currencyRate->currency_from->id ); ?>

                        <?php if($errors->has('currency_from_id')): ?>
                            <span class="help-block"
                                  role="alert"><?php echo e($errors->first('currency_from_id')); ?></span>
                        <?php endif; ?>
                    </div>
                    <div
                        class="form-group col-xs-12 col-lg-6 <?php echo e($errors->has('currency_to') ? 'has-error' : ''); ?>">
                        <label class="required"
                               for="currency_to_id"><?php echo e(trans('quickadmin.currencyRate.fields.currency_to')); ?>

                            *</label>
                        <select class="form-control select2" name="currency_to_id" id="currency_to_id" disabled>
                            <?php $__currentLoopData = $currency_tos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $entry): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option
                                    value="<?php echo e($id); ?>" <?php echo e((old('currency_to_id') ? old('currency_to_id') : $currencyRate->currency_to->id ?? '') == $id ? 'selected' : ''); ?>><?php echo e($entry); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                        <?php echo Form::hidden('currency_to_id', old('currency_to_id') ? old('currency_to_id') : $currencyRate->currency_to->id ); ?>

                        
                        <?php if($errors->has('currency_to_id')): ?>
                            <span class="help-block"
                                  role="alert"><?php echo e($errors->first('currency_to_id')); ?></span>
                        <?php endif; ?>
                    </div>
                </div>
                <div class="form-group">
                    <label class="required" for="rate"><?php echo e(trans('quickadmin.currencyRate.fields.rate')); ?>

                        *</label>
                    <input class="form-control" type="number" name="rate" id="rate"
                           value="<?php echo e(old('rate', $currencyRate->rate)); ?>" step="0.01">
                    <?php if($errors->has('rate')): ?>
                        <span class="help-block" role="alert"><?php echo e($errors->first('rate')); ?></span>
                    <?php endif; ?>
                    <span
                        class="help-block"><?php echo e(trans('quickadmin.currencyRate.fields.rate_helper')); ?></span>
                </div>
                <div class="form-group">
                    <button class="btn btn-danger" type="submit">
                        <?php echo e(trans('quickadmin.qa_save')); ?>

                    </button>
                </div>
            </form>
        </div>
    </div>

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

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/vdoma/resources/views/admin/currencyRates/edit.blade.php ENDPATH**/ ?>