From 9476ce8655ab04f02cf02c4fe6e9bce2b83a7edd Mon Sep 17 00:00:00 2001 From: Patrick Cool Date: Thu, 9 Apr 2009 11:49:45 +0200 Subject: [PATCH] [svn r19677] refactoring: removing duplicate code for create folder form actions bar in upload.php --- main/document/document.inc.php | 25 +++++++- main/document/document.php | 22 +------ main/document/upload.php | 114 +++++++++++++-------------------- 3 files changed, 72 insertions(+), 89 deletions(-) diff --git a/main/document/document.inc.php b/main/document/document.inc.php index b723932fe5..c81824b1fc 100644 --- a/main/document/document.inc.php +++ b/main/document/document.inc.php @@ -1,4 +1,4 @@ -'; + $new_folder_text .= ''; + // form title + $new_folder_text .= '
'.get_lang('CreateDir').'
'; + + // folder field + $new_folder_text .= '
'; + $new_folder_text .= '
*'.get_lang('NewDir').'
'; + $new_folder_text .= '
'; + $new_folder_text .= '
'; + // submit button + $new_folder_text .= '
'; + $new_folder_text .= '
 
'; + $new_folder_text .= '
'; + $new_folder_text .= '
'; + $new_folder_text .= ''; + $new_folder_text .= '
'; + + return $new_folder_text; +} ?> diff --git a/main/document/document.php b/main/document/document.php index 9244c9f4d3..d549b1f2d1 100644 --- a/main/document/document.php +++ b/main/document/document.php @@ -1,4 +1,4 @@ -'; - $new_folder_text .= ''; - // form title - $new_folder_text .= '
'.get_lang('CreateDir').'
'; - - // folder field - $new_folder_text .= '
'; - $new_folder_text .= '
*'.get_lang('NewDir').'
'; - $new_folder_text .= '
'; - $new_folder_text .= '
'; - // submit button - $new_folder_text .= '
'; - $new_folder_text .= '
 
'; - $new_folder_text .= '
'; - $new_folder_text .= '
'; - $new_folder_text .= ''; - $new_folder_text .= '
'; //show the form - echo $new_folder_text; + echo create_dir_form(); } diff --git a/main/document/upload.php b/main/document/upload.php index 08c5b6465a..9fdc908113 100644 --- a/main/document/upload.php +++ b/main/document/upload.php @@ -1,4 +1,4 @@ - addElement('header', '', $nameTools); + $form->addElement('hidden','curdirpath',$path); $form->addElement('file','user_upload',get_lang('File'),'id="user_upload" size="45"'); @@ -590,14 +575,7 @@ $form->display(); - -

-