Merge pull request #1816 from SevanNerse/master

acceptedFiles parameter is removed due to default value is defined fo…
This commit is contained in:
Cüneyt Şentürk 2021-01-29 16:26:33 +03:00 committed by GitHub
commit 2cd0e6b483
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 17 additions and 13 deletions

View File

@ -99,6 +99,10 @@ export default {
this.configurations.maxFiles = 1 this.configurations.maxFiles = 1
} }
if (this.configurations.acceptedFiles === undefined) {
this.configurations.acceptedFiles = 'image/*'
}
let finalOptions = { let finalOptions = {
...self.configurations, ...self.configurations,
url: this.url, url: this.url,

View File

@ -44,7 +44,7 @@
</div> </div>
@stack('picture_input_end') @stack('picture_input_end')
@else @else
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1), '', ['dropzone-class' => 'form-file', 'options' => ['acceptedFiles' => 'image/*']]) }} {{ Form::fileGroup('picture', trans_choice('general.pictures', 1), '', ['dropzone-class' => 'form-file']) }}
@endif @endif
@can('read-common-companies') @can('read-common-companies')

View File

@ -45,7 +45,7 @@
</div> </div>
@stack('picture_input_end') @stack('picture_input_end')
@else @else
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1), '', ['dropzone-class' => 'form-file', 'options' => ['acceptedFiles' => 'image/*']]) }} {{ Form::fileGroup('picture', trans_choice('general.pictures', 1), '', ['dropzone-class' => 'form-file']) }}
@endif @endif
@can('read-common-companies') @can('read-common-companies')

View File

@ -31,7 +31,7 @@
{{ Form::textareaGroup('address', trans('general.address')) }} {{ Form::textareaGroup('address', trans('general.address')) }}
{{ Form::fileGroup('logo', trans('companies.logo'), '', ['dropzone-class' => 'form-file', 'options' => ['acceptedFiles' => 'image/*']]) }} {{ Form::fileGroup('logo', trans('companies.logo'), '', ['dropzone-class' => 'form-file']) }}
{{ Form::radioGroup('enabled', trans('general.enabled'), true) }} {{ Form::radioGroup('enabled', trans('general.enabled'), true) }}
</div> </div>

View File

@ -32,7 +32,7 @@
{{ Form::textareaGroup('address', trans('general.address')) }} {{ Form::textareaGroup('address', trans('general.address')) }}
{{ Form::fileGroup('logo', trans('companies.logo'), '', ['dropzone-class' => 'form-file', 'options' => ['acceptedFiles' => 'image/*']]) }} {{ Form::fileGroup('logo', trans('companies.logo'), '', ['dropzone-class' => 'form-file']) }}
{{ Form::radioGroup('enabled', trans('general.enabled'), $company->enabled) }} {{ Form::radioGroup('enabled', trans('general.enabled'), $company->enabled) }}
</div> </div>

View File

@ -29,7 +29,7 @@
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, null, ['path' => route('modals.categories.create') . '?type=item', 'remote_action' => route('categories.index'). '?search=type:item']) }} {{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, null, ['path' => route('modals.categories.create') . '?type=item', 'remote_action' => route('categories.index'). '?search=type:item']) }}
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1), 'plus', ['dropzone-class' => 'form-file', 'options' => ['acceptedFiles' => 'image/*']]) }} {{ Form::fileGroup('picture', trans_choice('general.pictures', 1), 'plus', ['dropzone-class' => 'form-file']) }}
{{ Form::radioGroup('enabled', trans('general.enabled'), true) }} {{ Form::radioGroup('enabled', trans('general.enabled'), true) }}
</div> </div>

View File

@ -30,7 +30,7 @@
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $item->category_id, ['path' => route('modals.categories.create') . '?type=item', 'remote_action' => route('categories.index'). '?search=type:item']) }} {{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $item->category_id, ['path' => route('modals.categories.create') . '?type=item', 'remote_action' => route('categories.index'). '?search=type:item']) }}
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1), '', ['dropzone-class' => 'form-file', 'options' => ['acceptedFiles' => 'image/*']]) }} {{ Form::fileGroup('picture', trans_choice('general.pictures', 1), '', ['dropzone-class' => 'form-file']) }}
{{ Form::radioGroup('enabled', trans('general.enabled'), $item->enabled) }} {{ Form::radioGroup('enabled', trans('general.enabled'), $item->enabled) }}
</div> </div>

View File

@ -31,7 +31,7 @@
@if (!$hideAttachment) @if (!$hideAttachment)
<div class="col-md-12"> <div class="col-md-12">
{{ Form::fileGroup('attachment', trans('general.attachment'), '', ['dropzone-class' => 'w-100', 'multiple' => 'multiple'], !empty($document) ? $document->attachment : null , 'col-md-12') }} {{ Form::fileGroup('attachment', trans('general.attachment'), '', ['dropzone-class' => 'w-100', 'multiple' => 'multiple', 'options' => ['acceptedFiles' => $file_types]], !empty($document) ? $document->attachment : null , 'col-md-12') }}
</div> </div>
@endif @endif
</div> </div>

View File

@ -9,7 +9,7 @@
<div class="row"> <div class="row">
<div class="col-sm-6 col-md-6 col-lg-6 col-xl-6"> <div class="col-sm-6 col-md-6 col-lg-6 col-xl-6">
@if (!$hideLogo) @if (!$hideLogo)
{{ Form::fileGroup('company_logo', trans('settings.company.logo'), 'file-image-o', ['data-field' => 'setting', 'options' => ['acceptedFiles' => 'image/*']], setting('company.logo')) }} {{ Form::fileGroup('company_logo', trans('settings.company.logo'), 'file-image-o', ['data-field' => 'setting'], setting('company.logo')) }}
@endif @endif
</div> </div>

View File

@ -34,7 +34,7 @@
{{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed(), $user->locale) }} {{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed(), $user->locale) }}
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1), '', ['dropzone-class' => 'form-file', 'options' => ['acceptedFiles' => 'image/*']]) }} {{ Form::fileGroup('picture', trans_choice('general.pictures', 1), '', ['dropzone-class' => 'form-file']) }}
</div> </div>
</div> </div>

View File

@ -31,7 +31,7 @@
{{ Form::textareaGroup('address', trans('general.address')) }} {{ Form::textareaGroup('address', trans('general.address')) }}
{{ Form::fileGroup('logo', trans_choice('general.pictures', 1), '', ['dropzone-class' => 'form-file', 'options' => ['acceptedFiles' => 'image/*']]) }} {{ Form::fileGroup('logo', trans_choice('general.pictures', 1), '', ['dropzone-class' => 'form-file']) }}
{{ Form::textGroup('reference', trans('general.reference'), 'file', []) }} {{ Form::textGroup('reference', trans('general.reference'), 'file', []) }}

View File

@ -32,7 +32,7 @@
{{ Form::textareaGroup('address', trans('general.address')) }} {{ Form::textareaGroup('address', trans('general.address')) }}
{{ Form::fileGroup('logo', trans_choice('general.logos', 1), '', ['dropzone-class' => 'form-file', 'options' => ['acceptedFiles' => 'image/*']]) }} {{ Form::fileGroup('logo', trans_choice('general.logos', 1), '', ['dropzone-class' => 'form-file']) }}
{{ Form::textGroup('reference', trans('general.reference'), 'file', []) }} {{ Form::textGroup('reference', trans('general.reference'), 'file', []) }}

View File

@ -28,7 +28,7 @@
{{ Form::textareaGroup('address', trans('settings.company.address'), null, setting('company.address')) }} {{ Form::textareaGroup('address', trans('settings.company.address'), null, setting('company.address')) }}
{{ Form::fileGroup('logo', trans('settings.company.logo'), 'file-image-o', ['options' => ['acceptedFiles' => 'image/*']], setting('company.logo')) }} {{ Form::fileGroup('logo', trans('settings.company.logo'), 'file-image-o', [], setting('company.logo')) }}
</div> </div>
</div> </div>

View File

@ -59,7 +59,7 @@
{{ Form::textareaGroup('address', trans('settings.company.address')) }} {{ Form::textareaGroup('address', trans('settings.company.address')) }}
{{ Form::fileGroup('logo', trans('settings.company.logo'), '', ['dropzone-class' => 'form-file', 'options' => ['acceptedFiles' => 'image/*']]) }} {{ Form::fileGroup('logo', trans('settings.company.logo'), '', ['dropzone-class' => 'form-file']) }}
</div> </div>
</div> </div>