luci-base: ui.js FileUpload: option to enable Download button
[project/luci.git] / modules / luci-base / htdocs / luci-static / resources / form.js
index dbe1382ad406d1fb13c8aa31e6d8a92607cd74ae..df594a3a34068730a7ad9759c7477de33838312a 100644 (file)
@@ -4547,6 +4547,7 @@ var CBIFileUpload = CBIValue.extend(/** @lends LuCI.form.FileUpload.prototype */
                this.show_hidden = false;
                this.enable_upload = true;
                this.enable_remove = true;
+               this.enable_download = false;
                this.root_directory = '/etc/luci-uploads';
        },
 
@@ -4603,6 +4604,14 @@ var CBIFileUpload = CBIValue.extend(/** @lends LuCI.form.FileUpload.prototype */
         * @default true
         */
 
+       /**
+        * Toggle download file functionality.
+        *
+        * @name LuCI.form.FileUpload.prototype#enable_download
+        * @type boolean
+        * @default false
+        */
+
        /**
         * Specify the root directory for file browsing.
         *
@@ -4628,6 +4637,7 @@ var CBIFileUpload = CBIValue.extend(/** @lends LuCI.form.FileUpload.prototype */
                        show_hidden: this.show_hidden,
                        enable_upload: this.enable_upload,
                        enable_remove: this.enable_remove,
+                       enable_download: this.enable_download,
                        root_directory: this.root_directory,
                        disabled: (this.readonly != null) ? this.readonly : this.map.readonly
                });