Fixed file group accept type issue..
This commit is contained in:
parent
4c86ba6f07
commit
ff351be76e
@ -21,6 +21,16 @@ class File extends Form
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
if (! empty($this->options)) {
|
||||
$options = [];
|
||||
|
||||
foreach ($this->options as $option) {
|
||||
$options[$option->id] = $option->name;
|
||||
}
|
||||
|
||||
$this->options = $options;
|
||||
}
|
||||
|
||||
return view('components.form.group.file');
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,16 @@ class Ffile extends Form
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
if (! empty($this->options)) {
|
||||
$options = [];
|
||||
|
||||
foreach ($this->options as $option) {
|
||||
$options[$option->id] = $option->name;
|
||||
}
|
||||
|
||||
$this->options = $options;
|
||||
}
|
||||
|
||||
return view('components.form.input.file');
|
||||
}
|
||||
}
|
||||
|
@ -244,36 +244,36 @@ export default {
|
||||
},
|
||||
|
||||
watch: {
|
||||
attachments: function (attachments) {
|
||||
attachments.forEach((attachment) => {
|
||||
if(attachment.length != undefined) {
|
||||
var mockFile = {
|
||||
id: attachment[0].id,
|
||||
name: attachment[0].name,
|
||||
size: attachment[0].size,
|
||||
type: attachment[0].type,
|
||||
download: attachment[0].downloadPath,
|
||||
dropzone: 'edit',
|
||||
};
|
||||
this.dropzone.emit("addedfile", mockFile);
|
||||
this.dropzone.options.thumbnail.call(this.dropzone, mockFile, attachment[0].path);
|
||||
attachments: function (attachments) {
|
||||
attachments.forEach((attachment) => {
|
||||
if (attachment.length != undefined) {
|
||||
var mockFile = {
|
||||
id: attachment[0].id,
|
||||
name: attachment[0].name,
|
||||
size: attachment[0].size,
|
||||
type: attachment[0].type,
|
||||
download: attachment[0].downloadPath,
|
||||
dropzone: 'edit',
|
||||
};
|
||||
|
||||
// Make sure that there is no progress bar, etc...
|
||||
this.dropzone.emit("complete", mockFile);
|
||||
this.dropzone.emit("addedfile", mockFile);
|
||||
this.dropzone.options.thumbnail.call(this.dropzone, mockFile, attachment[0].path);
|
||||
|
||||
this.files.forEach(async (attachment) => {
|
||||
if (attachment.download) {
|
||||
attachment.previewElement.querySelector("[data-dz-download]").href = attachment.download;
|
||||
attachment.previewElement.querySelector("[data-dz-download]").classList.remove("hidden");
|
||||
// Make sure that there is no progress bar, etc...
|
||||
this.dropzone.emit("complete", mockFile);
|
||||
|
||||
this.files.forEach(async (attachment) => {
|
||||
if (attachment.download) {
|
||||
attachment.previewElement.querySelector("[data-dz-download]").href = attachment.download;
|
||||
attachment.previewElement.querySelector("[data-dz-download]").classList.remove("hidden");
|
||||
}
|
||||
});
|
||||
|
||||
this.onMaxFilesReached(this);
|
||||
}
|
||||
});
|
||||
|
||||
this.onMaxFilesReached(this);
|
||||
}
|
||||
}, this);
|
||||
|
||||
}, this);
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -11,8 +11,8 @@
|
||||
<div class="flex">
|
||||
<div>
|
||||
{!! trans('import.limitations', ['extensions' => strtoupper(config('excel.imports.extensions')),
|
||||
'row_limit' => config('excel.imports.row_limit')
|
||||
])
|
||||
'row_limit' => config('excel.imports.row_limit')
|
||||
])
|
||||
!!}
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user