diff --git a/main/document/upload.php b/main/document/upload.php index f8ec53c2ed..30c5e2816f 100755 --- a/main/document/upload.php +++ b/main/document/upload.php @@ -267,7 +267,7 @@ $form -> addElement('html', ''); // Button upload document $form->addElement('style_submit_button', 'submitDocument', get_lang('SendDocument'), 'class="upload"'); -$form->add_real_progress_bar('DocumentUpload', 'user_upload'); +$form->add_real_progress_bar('DocumentUpload', 'file'); $defaults = array('index_document' => 'checked="checked"'); diff --git a/main/inc/lib/formvalidator/FormValidator.class.php b/main/inc/lib/formvalidator/FormValidator.class.php index 3a4bc41536..8b7258a889 100755 --- a/main/inc/lib/formvalidator/FormValidator.class.php +++ b/main/inc/lib/formvalidator/FormValidator.class.php @@ -229,7 +229,7 @@ EOT; /** * Uses new functions (php 5.2) for displaying real upload progress. - * @param string $upload_id The value of the field UPLOAD_IDENTIFIER + * @param string $upload_id The value of the field UPLOAD_IDENTIFIER, the second parameter (XXX) of the $form->addElement('file', XXX) sentence * @param string $element_after The first element of the form (to place at first UPLOAD_IDENTIFIER) * @param int $delay (optional) The frequency of the xajax call * @param bool $wait_after_upload (optional) @@ -237,6 +237,7 @@ EOT; function add_real_progress_bar($upload_id, $element_after, $delay = 2, $wait_after_upload = false) { if (!function_exists('uploadprogress_get_info')) { + $this -> add_progress_bar($delay); return; } @@ -257,12 +258,12 @@ EOT; // Add div-element where the progress bar is to be displayed $this->addElement('html',' -
'); + '); if ($wait_after_upload) { $this->addElement('html',' @@ -279,7 +280,7 @@ EOT; } // Get the xajax code - $this->addElement('html', $xajax_upload -> getJavascript(api_get_path(WEB_LIBRARY_PATH).'xajax')); + $this->addElement('html', $xajax_upload->getJavascript(api_get_path(WEB_LIBRARY_PATH).'xajax')); // Get the upload code $this->addElement('html', '');