<?php
    $title = __('adminforms.config.title_update');
    $formpar = array('route' => array('admin.config.update', $config->id), 'method' => 'PUT');

    $tr = [
        'company name'       => __('adminforms.config.company_name'),
        'address'            => __('adminforms.config.address'),
        'vat number'         => __('adminforms.config.vat_number'),
        'reg number'         => __('adminforms.config.reg_number'),
        'bank account'       => __('adminforms.config.bank_account'),
        'logo'               => __('adminforms.config.logo'),
        'tel1'               => __('adminforms.config.tel1'),
        'tel2'               => __('adminforms.config.tel2'),
        'tel3'               => __('adminforms.config.tel3'),
        'fax'                => __('adminforms.config.fax'),
        'cel number'         => __('adminforms.config.cel_number'),
        'web'                => __('adminforms.config.web'),
        'email'              => __('adminforms.config.email'),
        'wtime'              => __('adminforms.config.wtime'),
        'gmap'               => __('adminforms.config.gmap'),
        'exrate'             => __('adminforms.config.exrate'),
        'sale status'        => __('adminforms.config.sale_status'),
        'sale title'         => __('adminforms.config.sale_title'),
        'sale discount'      => __('adminforms.config.sale_discount'),
        'sale pricelim'      => __('adminforms.config.sale_pricelim'),
        'sale sticker'       => __('adminforms.config.sale_sticker'),
        'sale sticker shown' => __('adminforms.config.sale_sticker_shown'),
        'def desc'           => __('adminforms.config.def_desc'),
        'title sufix'        => __('adminforms.config.title_sufix'),
        'ga'                 => __('adminforms.config.ga'),
        'invheader'          => __('adminforms.config.invheader'),

        'imt title'          => __('adminforms.config.imt_title'),
        'imt desc'           => __('adminforms.config.imt_desc'),
        'imt keyw'           => __('adminforms.config.imt_keyw'),
        'imt h1'             => __('adminforms.config.imt__h1'),

        'cmt title'          => __('adminforms.config.cmt_title'),
        'cmt desc'           => __('adminforms.config.cmt_desc'),
        'cmt keyw'           => __('adminforms.config.cmt_keyw'),
        'cmt h1'             => __('adminforms.config.cmt_h1'),


        'adw rm'             => __('adminforms.config.adw_rm'),
        'adw con'            => __('adminforms.config.adw_con'),
        'fb rm'              => __('adminforms.config.fb_rm'),
        'fb con'             => __('adminforms.config.fb_con'),
    ];
?>

<?php $__env->startSection('title'); ?><?php echo e($title); ?><?php $__env->stopSection(); ?>
<?php $__env->startSection('header'); ?><i class="fa fa-cog"></i> <?php echo e($title); ?><?php $__env->stopSection(); ?>
<?php $__env->startSection('header_desc'); ?> <?php $__env->stopSection(); ?>
<?php $__env->startSection('breadcumbs'); ?> <?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <!-- Main content -->
    <section class="content">



        <div class="row">

            <div class="col-xs-12">
                <?php if(session('result')): ?>
                    <div class="alert alert-success alert-dismissible">
                        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                        <i class="icon fa fa-check"></i> <strong>Info: </strong> &nbsp;  &nbsp;
                        <?php echo e(session('result')); ?>

                    </div>
                <?php endif; ?>
                <?php if(session('error')): ?>
                    <div class="alert alert-danger alert-dismissible">
                        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                        <i class="icon fa fa-exclamation-triangle"></i> <strong>Info: </strong> &nbsp;  &nbsp;
                        <?php echo e(session('error')); ?>

                    </div>
                <?php endif; ?>
                    <?php if($errors->any()): ?>
                        <div style="font-weight: bold; color: #9e0505"><?php echo e(__('adminforms.products.correct_errors')); ?></div>
                        <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div style="color: #9e0505;"><?php echo e(strtr($error, $tr)); ?></div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <br>
                    <?php endif; ?>
            </div>

            <?php echo Form::open($formpar); ?>


            <div class="col-xs-12">
                <div class="box">

                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title"><i class="fa fa-cog"></i> <?php echo e(__('adminforms.config.general_block')); ?></h3>
                        </div>

                        <div class="panel-body">
                            <div class="row">


                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('company_name', ucfirst(__('adminforms.config.company_name').':'))); ?>

                                    <?php echo e(Form::text('company_name', old('company_name', $config->company_name), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('company_name'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('address', ucfirst(__('adminforms.config.address').':'))); ?>

                                    <?php echo e(Form::text('address', old('address', $config->address), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('address'),$tr)); ?></small>
                                </div>

                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('vat_number', ucfirst(__('adminforms.config.vat_number').':'))); ?>

                                    <?php echo e(Form::text('vat_number', old('vat_number', $config->vat_number), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('vat_number'),$tr)); ?></small>
                                </div>

                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('reg_number', ucfirst(__('adminforms.config.reg_number').':'))); ?>

                                    <?php echo e(Form::text('reg_number', old('reg_number', $config->reg_number), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('reg_number'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('bank_account', ucfirst(__('adminforms.config.bank_account').':'))); ?>

                                    <?php echo e(Form::text('bank_account', old('bank_account', $config->bank_account), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('bank_account'),$tr)); ?></small>
                                </div>

                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('logo', ucfirst(__('adminforms.config.logo').':'))); ?>

                                    <?php echo e(Form::text('logo', old('logo', $config->logo), ['class' => 'form-control', 'onclick' => "openKCFinder('images',this, 'images')"])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('logo'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('tel1', ucfirst(__('adminforms.config.tel1').':'))); ?>

                                    <?php echo e(Form::text('tel1', old('tel1', $config->tel1), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('tel1'),$tr)); ?></small>
                                </div>

                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('tel2', ucfirst(__('adminforms.config.tel2').':'))); ?>

                                    <?php echo e(Form::text('tel2', old('tel2', $config->tel2), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('tel2'),$tr)); ?></small>
                                </div>

                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('tel3', ucfirst(__('adminforms.config.tel3').':'))); ?>

                                    <?php echo e(Form::text('tel3', old('tel3', $config->tel3), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('tel3'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('fax', ucfirst(__('adminforms.config.fax').':'))); ?>

                                    <?php echo e(Form::text('fax', old('fax', $config->fax), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('fax'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('cel_number', ucfirst(__('adminforms.config.cel_number').':'))); ?>

                                    <?php echo e(Form::text('cel_number', old('cel_number', $config->cel_number), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('cel_number'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('web', ucfirst(__('adminforms.config.web').':'))); ?>

                                    <?php echo e(Form::text('web', old('web', $config->web), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('web'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('email', ucfirst(__('adminforms.config.email').':'))); ?>

                                    <?php echo e(Form::text('email', old('email', $config->email), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('email'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('wtime', ucfirst(__('adminforms.config.wtime').':'))); ?>

                                    <?php echo e(Form::text('wtime', old('wtime', $config->wtime), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('wtime'),$tr)); ?></small>
                                </div>


                                

                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('invheader', ucfirst(__('adminforms.config.invheader').':'))); ?>

                                    <?php echo e(Form::text('invheader', old('invheader', $config->invheader), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('invheader'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('title_sufix', ucfirst(__('adminforms.config.title_sufix').':'))); ?>

                                    <?php echo e(Form::text('title_sufix', old('title_sufix', $config->title_sufix), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('title_sufix'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12">
                                    <?php echo e(Form::label('def_desc', ucfirst(__('adminforms.config.def_desc').':'))); ?>

                                    <?php echo e(Form::textarea('def_desc', old('def_desc', $config->def_desc), ['class' => 'form-control', 'rows' => 3])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('def_desc'),$tr)); ?></small>
                                </div>

                            </div><!-- /.row -->
                        </div><!-- /.panel-body -->


                    </div><!-- /.panel -->

                </div> <!-- /.box -->



                <div class="box">

                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title"><i class="fa fa-cog"></i> <?php echo e(__('adminforms.config.sale_block')); ?></h3>
                        </div>

                        <div class="panel-body">
                            <div class="row">


                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('sale_status', ucfirst(__('adminforms.config.sale_status').':'))); ?><br>
                                    <?php
                                        $cv = old('sale_status', $config->sale_status);
                                        $actval = !is_null($cv) ? $cv : 0;
                                    ?>
                                    <label class="radio-inline"><input type="radio" name="sale_status" value="1" <?php echo e($actval== 1 ? 'checked': ''); ?> > Da</label>
                                    <label class="radio-inline"><input type="radio" name="sale_status" value="0" <?php echo e($actval== 0 ? 'checked': ''); ?> > Ne</label>
                                    <small class="error"><?php echo e(strtr($errors->first('sale_status'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('sale_title', ucfirst(__('adminforms.config.sale_title').':'))); ?>

                                    <?php echo e(Form::text('sale_title', old('sale_title', $config->sale_title), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('sale_title'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('sale_discount', ucfirst(__('adminforms.config.sale_discount').':'))); ?>

                                    <?php echo e(Form::text('sale_discount', old('sale_discount', $config->sale_discount), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('sale_discount'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('sale_pricelim', ucfirst(__('adminforms.config.sale_pricelim').':'))); ?>

                                    <?php echo e(Form::text('sale_pricelim', old('sale_pricelim', $config->sale_pricelim), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('sale_pricelim'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('sale_sticker_shown', ucfirst(__('adminforms.config.sale_sticker_shown').':'))); ?><br>
                                    <?php
                                        $cv = old('sale_sticker_shown', $config->sale_sticker_shown);
                                        $actval = !is_null($cv) ? $cv : 0;
                                    ?>
                                    <label class="radio-inline"><input type="radio" name="sale_sticker_shown" value="1" <?php echo e($actval== 1 ? 'checked': ''); ?> > Da</label>
                                    <label class="radio-inline"><input type="radio" name="sale_sticker_shown" value="0" <?php echo e($actval== 0 ? 'checked': ''); ?> > Ne</label>
                                    <small class="error"><?php echo e(strtr($errors->first('sale_sticker_shown'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12 col-sm-6 col-md-3 pbb">
                                    <?php echo e(Form::label('sale_sticker', ucfirst(__('adminforms.config.sale_sticker').':'))); ?>

                                    <?php echo e(Form::text('sale_sticker', old('sale_sticker', $config->sale_sticker), ['class' => 'form-control', 'onclick' => "openKCFinder('images',this, 'images/stickers')"])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('sale_sticker'),$tr)); ?></small>
                                </div>





                            </div><!-- /.row -->
                        </div><!-- /.panel-body -->


                    </div><!-- /.panel -->

                </div> <!-- /.box -->


                <div class="box">

                    <div class="panel panel-default">

                        <div class="panel-heading">
                            <h3 class="panel-title"><i class="fa fa-cog"></i> <?php echo e(__('adminforms.config.metatags_block')); ?></h3>
                        </div>

                        <div class="panel-body">
                            <div class="row">

                                <div class="col-xs-12 col-sm-6 pbb">
                                    <?php echo e(Form::label('imt_title', ucfirst(__('adminforms.config.imt_title').':'))); ?>

                                    <?php echo e(Form::text('imt_title', old('imt_title', $imetatags->imt_title), ['class' => 'form-control', 'rows' => 3])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('imt_title'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12 col-sm-6 pbb">
                                    <?php echo e(Form::label('imt_h1', ucfirst(__('adminforms.config.imt_h1').':'))); ?>

                                    <?php echo e(Form::text('imt_h1', old('imt_h1', $imetatags->imt_h1), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('imt_h1'),$tr)); ?></small>
                                </div>

                                <div class="col-xs-12 col-sm-6">
                                    <?php echo e(Form::label('imt_desc', ucfirst(__('adminforms.config.imt_desc').':'))); ?>

                                    <?php echo e(Form::textarea('imt_desc', old('imt_desc', $imetatags->imt_desc), ['class' => 'form-control', 'rows' => 3])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('imt_desc'),$tr)); ?></small>
                                </div>

                                <div class="col-xs-12 col-sm-6">
                                    <?php echo e(Form::label('imt_keyw', ucfirst(__('adminforms.config.imt_keyw').':'))); ?>

                                    <?php echo e(Form::textarea('imt_keyw', old('imt_keyw', $imetatags->imt_keyw), ['class' => 'form-control', 'rows' => 3])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('imt_keyw'),$tr)); ?></small>
                                </div>




                                <div class="col-xs-12">
                                    <hr>
                                </div>


                                <div class="col-xs-12 col-sm-6 pbb">
                                    <?php echo e(Form::label('cmt_title', ucfirst(__('adminforms.config.cmt_title').':'))); ?>

                                    <?php echo e(Form::text('cmt_title', old('cmt_title', $cmetatags->cmt_title), ['class' => 'form-control', 'rows' => 3])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('cmt_title'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12 col-sm-6 pbb">
                                    <?php echo e(Form::label('cmt_h1', ucfirst(__('adminforms.config.cmt_h1').':'))); ?>

                                    <?php echo e(Form::text('cmt_h1', old('cmt_h1', $cmetatags->cmt_h1), ['class' => 'form-control'])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('cmt_h1'),$tr)); ?></small>
                                </div>

                                <div class="col-xs-12 col-sm-6">
                                    <?php echo e(Form::label('cmt_desc', ucfirst(__('adminforms.config.cmt_desc').':'))); ?>

                                    <?php echo e(Form::textarea('cmt_desc', old('cmt_desc', $cmetatags->cmt_desc), ['class' => 'form-control', 'rows' => 3])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('cmt_desc'),$tr)); ?></small>
                                </div>

                                <div class="col-xs-12 col-sm-6">
                                    <?php echo e(Form::label('cmt_keyw', ucfirst(__('adminforms.config.cmt_keyw').':'))); ?>

                                    <?php echo e(Form::textarea('cmt_keyw', old('cmt_keyw', $cmetatags->cmt_keyw), ['class' => 'form-control', 'rows' => 3])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('cmt_keyw'),$tr)); ?></small>
                                </div>

                            </div><!-- /.row -->
                        </div><!-- /.panel-body -->


                    </div><!-- /.panel -->
                </div> <!-- /.box -->



                <div class="box">

                    <div class="panel panel-default">

                        <div class="panel-heading">
                            <h3 class="panel-title"><i class="fa fa-cog"></i> <?php echo e(__('adminforms.config.codes_block')); ?></h3>
                        </div>

                        <div class="panel-body">
                            <div class="row">

                                <div class="col-xs-12 col-sm-6">
                                    <?php echo e(Form::label('gmap', ucfirst(__('adminforms.config.gmap').':'))); ?>

                                    <?php echo e(Form::textarea('gmap', old('gmap', $config->gmap), ['class' => 'form-control', 'rows' => 3])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('gmap'),$tr)); ?></small>
                                </div>

                                <div class="col-xs-12 col-sm-6">
                                    <?php echo e(Form::label('ga', ucfirst(__('adminforms.config.ga').':'))); ?>

                                    <?php echo e(Form::textarea('ga', old('ga', $config->ga), ['class' => 'form-control', 'rows' => 3])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('ga'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12">
                                    <br/>
                                </div>


                                <div class="col-xs-12 col-sm-6">
                                    <?php echo e(Form::label('adw_rm', ucfirst(__('adminforms.config.adw_rm').':'))); ?>

                                    <?php echo e(Form::textarea('adw_rm', old('adw_rm', $codes->adw_rm), ['class' => 'form-control', 'rows' => 3])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('adw_rm'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12 col-sm-6">
                                    <?php echo e(Form::label('adw_con', ucfirst(__('adminforms.config.adw_con').':'))); ?>

                                    <?php echo e(Form::textarea('adw_con', old('adw_con', $codes->adw_con), ['class' => 'form-control', 'rows' => 3])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('adw_con'),$tr)); ?></small>
                                </div>

                                <div class="col-xs-12">
                                    <br/>
                                </div>


                                <div class="col-xs-12 col-sm-6">
                                    <?php echo e(Form::label('fb_rm', ucfirst(__('adminforms.config.fb_rm').':'))); ?>

                                    <?php echo e(Form::textarea('fb_rm', old('fb_rm', $codes->fb_rm), ['class' => 'form-control', 'rows' => 3])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('fb_rm'),$tr)); ?></small>
                                </div>


                                <div class="col-xs-12 col-sm-6">
                                    <?php echo e(Form::label('fb_con', ucfirst(__('adminforms.config.fb_con').':'))); ?>

                                    <?php echo e(Form::textarea('fb_con', old('fb_con', $codes->fb_con), ['class' => 'form-control', 'rows' => 3])); ?>

                                    <small class="error"><?php echo e(strtr($errors->first('fb_con'),$tr)); ?></small>
                                </div>









                            </div><!-- /.row -->
                        </div><!-- /.panel-body -->


                    </div><!-- /.panel -->
                </div> <!-- /.box -->



            </div> <!-- /.col -->

            <div class="col-xs-12">
                <?php echo e(Form::submit(__('adminforms.config.btn_update'), ['class' => 'btn btn-success pull-right'])); ?>

            </div>

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


        </div>
        <!-- /.row -->

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

<?php $__env->startPush('css'); ?>
<?php $__env->stopPush(); ?>


<?php $__env->startPush('scripts'); ?>
    <script type="text/javascript">
        function openKCFinder(type,field,dir) {
            window.KCFinder = {  callBack: function(url) {  window.KCFinder = null;   field.value = url;}};
            window.open("/ckeditor/kcfinder/browse.php?type="+type+"&dir="+dir, "kcfinder_textbox","status=0, toolbar=0, location=0, menubar=0, directories=1,  " + "resizable=1, scrollbars=0, width=800, height=600");}
    </script>


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


<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>