<?php $__env->startSection('content'); ?>
<div class="col-md-12 content-header" >
    <h1><i class="fa fa-cogs"></i> <?php echo e(trans('application.system_settings')); ?></h1>
</div>
<section class="content">
    <div class="row">
        <div class="col-md-3">
        <?php echo $__env->make('settings.partials._menu', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
        </div>
        <div class="col-md-9">
            <div class="box box-primary">
            <div class="box-body">
            <?php if(count($errors) > 0): ?>
            <?php echo form_errors($errors); ?>
            <?php endif; ?>
             <?php if($setting): ?>
                <?php echo Form::model($setting, ['route' => ['settings.company.update', $setting->uuid], 'method'=>'PATCH', 'files'=>true]); ?>
             <?php else: ?>
                <?php echo Form::open(['route' => ['settings.company.store'], 'files'=>true]); ?>
            <?php endif; ?>
            <div class="form-group">
                <?php echo Form::label('name', trans('application.name')); ?>
                <?php echo Form::text('name', null, ['class' => "form-control input-sm", 'required']); ?>
            </div>
            <div class="form-group">
                <?php echo Form::label('contact', trans('application.contact_person')); ?>
                <?php echo Form::text('contact', null, ['class' => "form-control input-sm"]); ?>
            </div>
            <div class="form-group">
                <?php echo Form::label('email', trans('application.email')); ?>
                <?php echo Form::input('email', 'email', null, ['class' => "form-control input-sm", 'required']); ?>
            </div>
            <div class="form-group">
                <?php echo Form::label('phone', trans('application.phone')); ?>
                <?php echo Form::text('phone', null, ['class' => "form-control input-sm", 'required']); ?>
            </div>
            <div class="form-group">
                <?php echo Form::label('address1', trans('application.address_1')); ?>
                <?php echo Form::text('address1', null, ['class' => "form-control input-sm", 'required']); ?>
            </div>
            <div class="form-group">
                <?php echo Form::label('address2', trans('application.address_2')); ?>
                <?php echo Form::text('address2', null, ['class' => "form-control input-sm"]); ?>
            </div>
            <div class="form-group">
                <?php echo Form::label('city', trans('application.city')); ?>
                <?php echo Form::text('city', null, ['class' => "form-control input-sm", 'required']); ?>
            </div>
            <div class="form-group">
                <?php echo Form::label('state', trans('application.state_province')); ?>
                <?php echo Form::text('state', null, ['class' => "form-control input-sm", 'required']); ?>
            </div>
            <div class="form-group">
                <?php echo Form::label('postal_code', trans('application.zip_postal_code')); ?>
                <?php echo Form::text('postal_code', null, ['class' => "form-control input-sm"]); ?>
            </div>
            <div class="form-group">
                <?php echo Form::label('country', trans('application.country')); ?>
                <?php echo Form::text('country', null, ['class' => "form-control input-sm", 'required']); ?>
            </div>
            <div class="form-group">
                <?php echo Form::label('gst', trans('application.gst_number')); ?>
                <?php echo Form::text('gst', null, ['class' => "form-control input-sm"]); ?>
            </div>
            <div class="form-group">
                <?php echo Form::label('website', trans('application.website')); ?>
                <?php echo Form::text('website', null, ['class' => "form-control input-sm"]); ?>
            </div>
            <div class="form-group">
                <?php echo Form::label('logo', trans('application.logo').'('.trans('application.width').': 200)'); ?>
                <?php if($setting && $setting->logo != ''): ?>
                <?php echo HTML::image(asset('assets/img/'.$setting->logo), 'logo', array('class' => 'thumbnail')); ?>
                <?php endif; ?>
                <div class=" form-group input-group input-file" style="margin-bottom: 10px;width:50%">
                    <div class="form-control input-sm"></div>
                      <span class="input-group-addon">
                        <a class='btn btn-sm btn-primary' href='javascript:;'>
                            <?php echo e(trans('application.browse')); ?>
                            <input type="file" name="logo" id="logo" onchange="$(this).parent().parent().parent().find('.form-control').html($(this).val());">
                        </a>
                      </span>
                </div>
            </div>
            <div class="form-group">
                <?php echo Form::label('favicon', trans('application.favicon').'(16x16)'); ?>
                <?php if($setting && $setting->favicon != ''): ?>
                <?php echo HTML::image(asset('assets/img/'.$setting->favicon), 'favicon', array('class' => 'thumbnail')); ?>
                <?php endif; ?>
                <div class=" form-group input-group input-file" style="margin-bottom: 10px;width:50%">
                    <div class="form-control  input-sm"></div>
                      <span class="input-group-addon">
                        <a class='btn btn-sm btn-primary' href='javascript:;'>
                            <?php echo e(trans('application.browse')); ?>
                            <input type="file" name="favicon" id="favicon" onchange="$(this).parent().parent().parent().find('.form-control').html($(this).val());">
                        </a>
                      </span>
                </div>
            </div>
            <div class="form-group">
                <?php echo Form::label('date_format', trans('application.date_format')); ?>
                <?php echo Form::select('date_format', array('d/m/Y' => date('d/m/Y'),
                    'm/d/Y' => date('m/d/Y'),
                    'Y/m/d' => date('Y/m/d'),
                    'F j, Y' => date('F j, Y'),
                    'm.d.y' => date('m.d.Y'),
                    'd-m-Y' => date('d-m-Y'),
                    'D M j Y' => date('D M j Y')),null, ['class' => "form-control input-sm"]); ?>
            </div>
            <div class="form-group">
                <?php echo Form::label('thousand_separator', trans('application.amount_thousand_separator')); ?>
                <?php echo Form::select('thousand_separator', array(',' => '1,000 - Comma Separator','.' => '1.000 - Dot Separator'),null, ['class' => "form-control input-sm"]); ?>
            </div>
            <div class="form-group">
                <?php echo Form::label('decimal_separator', trans('application.amount_decimal_separator')); ?>
                <?php echo Form::select('decimal_separator', array('.' => '1000.00 - Dot',',' => '1000,00 - Comma'),null, ['class' => "form-control input-sm"]); ?>
            </div>
            <div class="form-group">
                <?php echo Form::label('decimals', trans('application.amount_decimals')); ?>
                <?php echo Form::select('decimals', array('1' => '1','2' => '2','3' => '3','4' => '4','5' => '5'),2, ['class' => "form-control input-sm"]); ?>
            </div>
            <div class="form-group">
                <?php echo Form::submit(trans('application.save_settings'), ['class' => "btn btn-primary btn-sm"]); ?>
            </div>
            <?php echo Form::close(); ?>
            </div>
            </div>
        </div>
    </div>
</section>

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