diff --git a/etemplate/inc/class.etemplate_widget_file.inc.php b/etemplate/inc/class.etemplate_widget_file.inc.php index 7c5760e378..f9758141e8 100644 --- a/etemplate/inc/class.etemplate_widget_file.inc.php +++ b/etemplate/inc/class.etemplate_widget_file.inc.php @@ -29,9 +29,9 @@ class etemplate_widget_file extends etemplate_widget // Legacy multiple - id ends in [] if(substr($this->id,-2) == '[]') { - $this->attrs['multiple'] = true; + $this->setElementAttribute($this->id, 'multiple', true); } - $this->attrs['max_file_size'] = egw_vfs::int_size(ini_get('upload_max_filesize')); + $this->setElementAttribute($this->id, 'max_file_size', egw_vfs::int_size(ini_get('upload_max_filesize'))); } /** diff --git a/etemplate/js/et2_widget_file.js b/etemplate/js/et2_widget_file.js index c9ca789cdc..0caee7e4b5 100644 --- a/etemplate/js/et2_widget_file.js +++ b/etemplate/js/et2_widget_file.js @@ -276,7 +276,7 @@ var et2_file = et2_inputWidget.extend({ if(this.input[0].files[index]) { var file = this.input[0].files[index]; if(file.size > this.options.max_file_size) { - error = this.egw().lang("File too large"); + error = this.egw().lang("File too large. Maximum %1", et2_vfsSize.prototype.human_size(this.options.max_file_size)); } } if(this.progress)