Pārlūkot izejas kodu

bootstrap file上传bug修复

Jiang qinghua 5 gadi atpakaļ
vecāks
revīzija
040aae61f9

+ 25 - 0
resources/lang/en/admin.php

@@ -145,5 +145,30 @@ return [
         'display_all'           => ' <i class="glyphicon glyphicon-th icon-th"></i> ',
         'focus'                 => 'Focus',
     ],
+    'uploader' => [
+        'add_new_media' => 'Browse',
+        'drag_file' => 'Or drag file here',
+        'max_file_limit' => 'The :attribute may not be greater than :max.',
+        'exceed_size' => 'Exceeds the maximum file-size',
+        'interrupt' => 'Interrupt',
+        'upload_failed' => 'Upload failed! Please try again.',
+        'selected_files' => ':num files selected,size: :size。',
+        'selected_has_failed' => 'Uploaded: :success, failed: :fail, <a class="retry"  href="javascript:"";">retry</a>or<a class="ignore" href="javascript:"";">ignore</a>',
+        'selected_success' => ':num(:size) files selected, Uploaded: :success.',
+        'dot' => ', ',
+        'failed_num' => 'failed::fail.',
+        'pause_upload' => 'Pause',
+        'go_on_upload' => 'Go On',
+        'start_upload' => 'Start Upload',
+        'upload_success_message' => ':success files uploaded successfully',
+        'go_on_add' => 'New File',
+        'Q_TYPE_DENIED' => 'Sorry, the type of this file is not allowed!',
+        'Q_EXCEED_NUM_LIMIT' => 'Sorry, maximum number of allowable file uploads has been exceeded!',
+        'F_EXCEED_SIZE' => 'Sorry,the maximum file-size has been exceeded!',
+        'Q_EXCEED_SIZE_LIMIT' => 'Sorry, the maximum file-size has been exceeded!',
+        'F_DUPLICATE' => 'Duplicate file.',
+    ],
+    'import_extension_confirm' => 'Are you sure import the extension?',
+    'selected_must_less_then'  => 'Only supports maximum :num options.',
     'menu_titles' => [],
 ];

+ 1 - 1
src/Form/Field/BootstrapFile.php

@@ -187,7 +187,7 @@ class BootstrapFile extends Field
         $options = json_encode($this->options);
 
         $this->script = <<<JS
-$("input{$this->getElementClassSelector()}").fileinput({$options});
+$("{$this->getElementClassSelector()}").fileinput({$options});
 JS;
 
         return parent::render();

+ 1 - 1
src/Form/Field/BootstrapMultipleFile.php

@@ -227,7 +227,7 @@ class BootstrapMultipleFile extends Field
         $options = json_encode($this->options);
 
         $this->script = <<<JS
-$("input{$this->getElementClassSelector()}").fileinput({$options});
+$("{$this->getElementClassSelector()}").fileinput({$options});
 JS;
 
         return parent::render();

+ 1 - 1
src/Form/Field/BootstrapUploadField.php

@@ -28,7 +28,7 @@ trait BootstrapUploadField
      *
      * @var \Illuminate\Filesystem\Filesystem
      */
-    protected $storage = '';
+    protected $storage;
 
     /**
      * If use unique name to store upload file.