From 15b1ee25422544ebb2b4528ea8316c293206055f Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Tue, 14 Jul 2009 16:14:10 +0200 Subject: [PATCH] [svn r22068] FS#2867 - The glossary tool: Eliminating the global variable $fck_attribute. --- main/glossary/index.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/main/glossary/index.php b/main/glossary/index.php index 928820caf1..7f29feedc2 100755 --- a/main/glossary/index.php +++ b/main/glossary/index.php @@ -41,12 +41,7 @@ $interbreadcrumb[] = array ("url"=>"index.php", "name"=> get_lang('Glossary')); Display::display_header(get_lang(ucfirst($tool))); // Tool introduction -Display::display_introduction_section(TOOL_GLOSSARY,'left'); - -// Glossary FckEditor setting -$fck_attribute['Width'] = '100%'; -$fck_attribute['Height'] = '300'; -$fck_attribute['ToolbarSet'] = 'Glossary'; +Display::display_introduction_section(TOOL_GLOSSARY); if ($_GET['action'] == 'changeview' AND in_array($_GET['view'],array('list','table'))) { @@ -62,7 +57,7 @@ if (api_is_allowed_to_edit()) { $form->addElement('header', '', get_lang('TermAddNew')); $form->addElement('text', 'glossary_title', get_lang('TermName'), array('size'=>'95')); //$form->applyFilter('glossary_title', 'html_filter'); - $form->addElement('html_editor', 'glossary_comment', get_lang('TermDefinition')); + $form->addElement('html_editor', 'glossary_comment', get_lang('TermDefinition'), null, array('ToolbarSet' => 'Glossary', 'Width' => '100%', 'Height' => '300')); $form->addElement('style_submit_button', 'SubmitGlossary', get_lang('TermAddButton'), 'class="save"'); // setting the rules $form->addRule('glossary_title', '
'.get_lang('ThisFieldIsRequired'), 'required'); @@ -89,7 +84,7 @@ if (api_is_allowed_to_edit()) { $form->addElement('hidden', 'glossary_id'); $form->addElement('text', 'glossary_title', get_lang('TermName'),array('size'=>'100')); //$form->applyFilter('glossary_title', 'html_filter'); - $form->addElement('html_editor', 'glossary_comment', get_lang('TermDefinition')); + $form->addElement('html_editor', 'glossary_comment', get_lang('TermDefinition'), null, array('ToolbarSet' => 'Glossary', 'Width' => '100%', 'Height' => '300')); $form->addElement('style_submit_button', 'SubmitGlossary', get_lang('TermUpdateButton'), 'class="save"'); // setting the defaults