diff --git a/etemplate/js/et2_widget_file.js b/etemplate/js/et2_widget_file.js index 7a844e4a0a..5907e0c09b 100644 --- a/etemplate/js/et2_widget_file.js +++ b/etemplate/js/et2_widget_file.js @@ -185,7 +185,37 @@ var et2_file = et2_inputWidget.extend( var value = this.options.value ? this.options.value : this.input.val(); return value; }, - + + /** + * You can't actually set value, but clearing works + */ + set_value: function(value) { + if(!value || typeof value == "undefined") + { + value = {}; + } + if(jQuery.isEmptyObject(value)) + { + this.options.value = {}; + this.progress.empty(); + + // Reset the HTML element + this.input.wrap('