v2 first commit
This commit is contained in:
		| @@ -3,61 +3,45 @@ | ||||
| @section('title', trans('general.title.new', ['type' => trans_choice('general.companies', 1)])) | ||||
|  | ||||
| @section('content') | ||||
|     <!-- Default box --> | ||||
|     <div class="box box-success"> | ||||
|         {!! Form::open(['url' => 'common/companies', 'files' => true, 'role' => 'form', 'class' => 'form-loading-button']) !!} | ||||
|         <div class="box-body"> | ||||
|             {{ Form::textGroup('company_name', trans('general.name'), 'id-card-o') }} | ||||
|     <div class="card"> | ||||
|         {!! Form::open([ | ||||
|             'id' => 'company', | ||||
|             'route' => 'companies.store', | ||||
|             '@submit.prevent' => 'onSubmit', | ||||
|             '@keydown' => 'form.errors.clear($event.target.name)', | ||||
|             'files' => true, | ||||
|             'role' => 'form', | ||||
|             'class' => 'form-loading-button', | ||||
|             'novalidate' => true | ||||
|         ]) !!} | ||||
|  | ||||
|             {{ Form::textGroup('domain', trans('companies.domain'), 'globe') }} | ||||
|             <div class="card-body"> | ||||
|                 <div class="row"> | ||||
|                     {{ Form::textGroup('name', trans('general.name'), 'building') }} | ||||
|  | ||||
|             {{ Form::emailGroup('company_email', trans('general.email'), 'envelope') }} | ||||
|                     {{ Form::emailGroup('email', trans('general.email'), 'envelope') }} | ||||
|  | ||||
|             {{ Form::selectGroup('default_currency', trans_choice('general.currencies', 1), 'money', $currencies) }} | ||||
|                     {{ Form::selectGroup('currency', trans_choice('general.currencies', 1), 'exchange-alt', $currencies) }} | ||||
|  | ||||
|             {{ Form::textareaGroup('company_address', trans('general.address')) }} | ||||
|                     {{ Form::textGroup('domain', trans('companies.domain'), 'globe', []) }} | ||||
|  | ||||
|             {{ Form::fileGroup('company_logo', trans('companies.logo')) }} | ||||
|                     {{ Form::textareaGroup('address', trans('general.address')) }} | ||||
|  | ||||
|             {{ Form::radioGroup('enabled', trans('general.enabled')) }} | ||||
|         </div> | ||||
|         <!-- /.box-body --> | ||||
|                     {{ Form::fileGroup('logo', trans('companies.logo')) }} | ||||
|  | ||||
|         <div class="box-footer"> | ||||
|             {{ Form::saveButtons('common/companies') }} | ||||
|         </div> | ||||
|         <!-- /.box-footer --> | ||||
|                     {{ Form::radioGroup('enabled', trans('general.enabled')) }} | ||||
|                 </div> | ||||
|             </div> | ||||
|  | ||||
|             <div class="card-footer"> | ||||
|                 <div class="row float-right"> | ||||
|                     {{ Form::saveButtons('common/companies') }} | ||||
|                 </div> | ||||
|             </div> | ||||
|         {!! Form::close() !!} | ||||
|     </div> | ||||
| @endsection | ||||
|  | ||||
| @push('js') | ||||
|     <script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script> | ||||
| @endpush | ||||
|  | ||||
| @push('css') | ||||
|     <link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}"> | ||||
| @endpush | ||||
|  | ||||
| @push('scripts') | ||||
|     <script type="text/javascript"> | ||||
|         var text_yes = '{{ trans('general.yes') }}'; | ||||
|         var text_no = '{{ trans('general.no') }}'; | ||||
|  | ||||
|         $(document).ready(function(){ | ||||
|             $('#enabled_1').trigger('click'); | ||||
|             $('#company_name').focus(); | ||||
|  | ||||
|             $("#default_currency").select2({ | ||||
|                 placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}" | ||||
|             }); | ||||
|  | ||||
|             $('#company_logo').fancyfile({ | ||||
|                 text  : '{{ trans('general.form.select.file') }}', | ||||
|                 style : 'btn-default', | ||||
|                 placeholder : '{{ trans('general.form.no_file_selected') }}' | ||||
|             }); | ||||
|         }); | ||||
|     </script> | ||||
| @push('scripts_start') | ||||
|     <script src="{{ asset('public/js/common/companies.js?v=' . version('short')) }}"></script> | ||||
| @endpush | ||||
|   | ||||
		Reference in New Issue
	
	Block a user