{!! Form::open(['url'=>route('saveProfile'),'method'=>'post','files'=>true, 'class' => 'image-form']) !!}
  {!! Form::hidden('image') !!}
  <section id="profile" class="panel panel-primary">
    <header class="panel-heading">
      <h2>@lang('backend.profile')</h2>
    </header>
    <div class="panel-body">
      @if(Session::has('message'))
        <div class="alert {{ Session::get('alert-class') }} alert-dismissible" role="alert">
          <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <p>{{ Session::get('message') }}</p>
        </div>
      @endif
      <div class="form-group col-xs-12 col-sm-6">
        <div class="col-xs-12 image-with-preview box-bordered text-center">

          <label for="">@lang('backend.select-company-logo')</label> <br>
          <img class="prev-img img-bordered" alt="Logo" src="{{ !empty($masterLogo)?asset($storage_url.'img/'.$masterLogo):'http://via.placeholder.com/200x200' }}">
          <div class="{{ $errors->has('companyLogo') ? ' has-error' : '' }}">
            {!! Form::file('companyLogo',['class'=>'form-control','data-fileinput'=>'image']) !!}
            @if ($errors->has('companyLogo'))
              <span class="help-block">
                <strong>{{ $errors->first('companyLogo') }}</strong>
              </span>
            @endif
            <br>
            <div class="upload-rules text-left">
              <ul>
                <li>@lang('backend.min-resolution') <strong>200x200 px</strong></li>
                <li>@lang('backend.file-type') <strong>PNG/JPG</strong></li>
                <li>@lang('backend.max-file-size') <strong>500kb</strong></li>
              </ul>
            </div>
          </div>
        </div>

        <div class="col-xs-12 image-with-preview box-bordered text-center">
          <label for="">@lang('backend.select-company-icon')</label> <br>
          <img class="prev-img img-bordered" alt="Favicon" src="{{ !empty($masterFavicon)?asset($storage_url.'img/'.$masterFavicon):'http://via.placeholder.com/200x200' }}" style="padding:84px">
          <div class="{{ $errors->has('companyFavicon') ? ' has-error' : '' }}">
            {!! Form::hidden('companyFaviconId',$companyFavicon->id) !!}
            @php
              $version = rand(1,100);
            @endphp
            {!! Form::hidden('faviconVersion', $version) !!}
            {!! Form::file('companyFavicon',['class'=>'form-control','data-fileinput'=>'image']) !!}
            @if ($errors->has('companyFavicon'))
                <span class="help-block">
                    <strong>{{ $errors->first('companyFavicon') }}</strong>
                </span>
            @endif
            <br>
            <div class="upload-rules text-left">
              <ul>
                <li>@lang('backend.min-resolution') <strong>32 x 32 px</strong></li>
                <li>@lang('backend.file-type') <strong>*.ico</strong></li>
                <li>@lang('backend.max-file-size') <strong>50kb</strong></li>
              </ul>
            </div>
          </div>
        </div>
      </div>

      <div class="form-group col-xs-12 col-sm-6{{ $errors->has('companyName') ? ' has-error' : '' }}">
        <label class="control-label">
          <i class="fa fa-id-badge" aria-hidden="true"></i> @lang('backend.company-name')
        </label>
        {!! Form::hidden('companyNameId',$companyName->id) !!}
        {!! Form::text('companyName',$companyName->setting_value,['class'=>'form-control']) !!}
        @if ($errors->has('companyName'))
            <span class="help-block">
                <strong>{{ $errors->first('companyName') }}</strong>
            </span>
        @endif
      </div>

      <div class="form-group col-xs-12 col-sm-6">
        <label class="radio-inline">
          <input type="checkbox" name="logoSetting" {{ $logoSetting == 'yes' ? 'checked' : '' }}> @lang('backend.display-company-logo')
        </label>
        <label class="radio-inline" style="margin-left: 0">
          <input type="checkbox" name="nameSetting" {{ $nameSetting == 'yes' ? 'checked' : '' }}> @lang('backend.display-company-name')
        </label>
      </div>

      <div class="form-group col-xs-12 col-sm-6{{ $errors->has('companyDesc') ? ' has-error' : '' }}">
        <label class="control-label">
          <i class="fa fa-info-circle" aria-hidden="true"></i> @lang('backend.company-description')
        </label>
        {!! Form::hidden('companyDescId',$companyDesc->id) !!}
        {!! Form::textarea('companyDesc',$companyDesc->setting_value,['class'=>'form-control not-tinymce','max'=>'255']) !!}

        @if ($errors->has('companyDesc'))
          <span class="help-block">
              <strong>{{ $errors->first('companyDesc') }}</strong>
          </span>
        @endif
      </div>

    </div>
    <footer class="panel-footer text-right">
      <button type="submit" class="btn btn-primary btn-image-submit">@lang('backend.update')</button>
    </footer>
  </section>
{!! Form::close() !!}
