<?php
    use App\Helpers\Form as FormTemplate;
    use App\Helpers\Template;

    $statusValue      = ['default' => 'Select status', 'active' => config('zvn.template.status.active.name'), 'inactive' => config('zvn.template.status.inactive.name')];

    $formInputAttr = config('zvn.template.form_input');
    $formLabelAttr = config('zvn.template.form_label');
    $formCkeditor  = config('zvn.template.form_ckeditor');

    $item = $items->firstWhere('key_value',  'setting-email');
    $itemValue = ($item) ? json_decode($item["value"], true) : null;
    
    $inputHiddenID    = Form::hidden('id', @$item['id']);
    $inputHiddenKeyValue    = Form::hidden('key_value', @$item['key_value'] ?? 'setting-email');

    $elements = [
        [
            'label'   => Form::label('value_email', 'Email', $formLabelAttr),
            'element' => Form::text('value[email]', @$itemValue['email'],  $formInputAttr )
        ],[
            'label'   => Form::label('value_password', 'Password', $formLabelAttr),
            'element' => Form::text('value[password]', @$itemValue['password'],  $formInputAttr )
        ],[
            'label'   => Form::label('value_bcc', 'Email BCC', $formLabelAttr),
            'element' => Form::text('value[bcc]', @$itemValue['bcc'],  $formInputAttr )
        ], 
        // ,[
        //     'label'   => Form::label('main_introduce', 'Introduce', $formLabelAttr),
        //     'element' => Form::textArea('main[introduce]', @$item['introduce'],  $formCkeditor )
        // ],[
        //     'label'   => Form::label('main_diachi', 'Địa chỉ', $formLabelAttr),
        //     'element' => Form::text('main[diachi]', @$item['diachi'],  $formInputAttr )
        // ],[
        //     'label'   => Form::label('main_thoigian', 'Thời gian làm việc', $formLabelAttr),
        //     'element' => Form::text('main[thoigian]', @$item['hotline'],  $formInputAttr )
        // ],[
        //     'label'   => Form::label('main_logo', 'Logo', $formLabelAttr),
        //     'element' => Form::file('main[logo]', $formInputAttr ),
        //     'thumb'   => (!empty(@$item['id'])) ? Template::showItemThumb($controllerName, @$item['thumb'], @$item['name']) : null ,
        //     'type'    => "thumb"
        // ]
        [
            'element' => $inputHiddenID . $inputHiddenKeyValue . Form::submit('Save', ['class' => 'btn btn-success']),
            'type' => 'btn-submit',
        ],
    ];
?> <div class="row"> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="x_panel"> <?php echo $__env->make('admin.templates.x_title', ['title' => $title], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <div class="x_content"> <?php echo e(Form::open([ 'method' => 'POST', 'url' => route("$controllerName/save"), 'accept-charset' => 'UTF-8', 'enctype' => 'multipart/form-data', 'class' => 'form-horizontal form-label-left', 'id' => 'setting_email', ])); ?> <?php echo FormTemplate::show($elements); ?> <?php echo e(Form::close()); ?> </div> </div> </div> </div><?php /**PATH D:\xampp\htdocs\offline_laravel_duongle\resources\views/admin/pages/setting/email.blade.php ENDPATH**/ ?>