');
diff --git a/main/admin/configure_inscription.php b/main/admin/configure_inscription.php
index 95682d7a6a..b2ab15e679 100755
--- a/main/admin/configure_inscription.php
+++ b/main/admin/configure_inscription.php
@@ -243,16 +243,16 @@ if ($display_all_form) {
// EXTENDED FIELDS
if (api_get_setting('extended_profile') == 'true' && api_get_setting('extendedprofile_registration','mycomptetences') == 'true') {
- $form->add_html_editor('competences', get_lang('MyCompetences'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '100%', 'Height' => '130'));
+ $form->addHtmlEditor('competences', get_lang('MyCompetences'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '100%', 'Height' => '130'));
}
if (api_get_setting('extended_profile') == 'true' && api_get_setting('extendedprofile_registration','mydiplomas') == 'true') {
- $form->add_html_editor('diplomas', get_lang('MyDiplomas'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '100%', 'Height' => '130'));
+ $form->addHtmlEditor('diplomas', get_lang('MyDiplomas'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '100%', 'Height' => '130'));
}
if (api_get_setting('extended_profile') == 'true' && api_get_setting('extendedprofile_registration','myteach') == 'true') {
- $form->add_html_editor('teach', get_lang('MyTeach'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '100%', 'Height' => '130'));
+ $form->addHtmlEditor('teach', get_lang('MyTeach'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '100%', 'Height' => '130'));
}
if (api_get_setting('extended_profile') == 'true' && api_get_setting('extendedprofile_registration','mypersonalopenarea') == 'true') {
- $form->add_html_editor('openarea', get_lang('MyPersonalOpenArea'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '100%', 'Height' => '130'));
+ $form->addHtmlEditor('openarea', get_lang('MyPersonalOpenArea'), false, false, array('ToolbarSet' => 'Profile', 'Width' => '100%', 'Height' => '130'));
}
if (api_get_setting('extended_profile') == 'true') {
if (api_get_setting('extendedprofile_registrationrequired', 'mycomptetences') == 'true') {
@@ -356,7 +356,7 @@ switch ($action){
$renderer->setRequiredNoteTemplate('');
$form->addElement('hidden', 'formSent', '1');
$default[$name] = str_replace('{rel_path}', api_get_path(REL_PATH), $open);
- $form->add_html_editor($name, '', true, false, array('ToolbarSet' => 'PortalHomePage', 'Width' => '100%', 'Height' => '400'));
+ $form->addHtmlEditor($name, '', true, false, array('ToolbarSet' => 'PortalHomePage', 'Width' => '100%', 'Height' => '400'));
$form->addElement('style_submit_button', null, get_lang('Save'), 'class="save"');
$form->setDefaults($default);
$form->display();
diff --git a/main/admin/legal_add.php b/main/admin/legal_add.php
index 73124ae5bc..a3b862ac20 100755
--- a/main/admin/legal_add.php
+++ b/main/admin/legal_add.php
@@ -99,7 +99,7 @@ if (isset($_POST['language'])) {
$form->addElement('static', Security::remove_XSS($_POST['language']));
$form->addElement('hidden', 'language',Security::remove_XSS($_POST['language']));
- $form->add_html_editor('content', get_lang('Content'), true, false, array('ToolbarSet' => 'terms_and_conditions', 'Width' => '100%', 'Height' => '250'));
+ $form->addHtmlEditor('content', get_lang('Content'), true, false, array('ToolbarSet' => 'terms_and_conditions', 'Width' => '100%', 'Height' => '250'));
$form->addElement('radio', 'type', '', get_lang('HTMLText') ,'0');
$form->addElement('radio', 'type', '', get_lang('PageLink') ,'1');
diff --git a/main/admin/system_announcements.php b/main/admin/system_announcements.php
index a435755e2d..861691cd0b 100755
--- a/main/admin/system_announcements.php
+++ b/main/admin/system_announcements.php
@@ -142,7 +142,7 @@ if ($action_todo) {
}
$form->addElement('select', 'lang',get_lang('Language'), $language_list_with_keys);
- $form->add_html_editor('content', get_lang('Content'), true, false, array('ToolbarSet' => 'PortalNews', 'Width' => '100%', 'Height' => '300'));
+ $form->addHtmlEditor('content', get_lang('Content'), true, false, array('ToolbarSet' => 'PortalNews', 'Width' => '100%', 'Height' => '300'));
$form->addDateRangePicker('range', get_lang('StartTimeWindow'), true, array('id' => 'date_range'));
$group = array();
diff --git a/main/admin/usergroups.php b/main/admin/usergroups.php
index b0386f9ef7..f76c826e8d 100755
--- a/main/admin/usergroups.php
+++ b/main/admin/usergroups.php
@@ -107,7 +107,7 @@ if (isset($_GET['action']) && $_GET['action'] == 'add') {
$form->addElement('header', get_lang('Add'));
$form->addElement('text', 'name', get_lang('name'), array('size' => '70', 'id' => 'name'));
//$form->applyFilter('note_title', 'html_filter');
- $form->add_html_editor('description', get_lang('Description'), false, false, array('Width' => '95%', 'Height' => '250'));
+ $form->addHtmlEditor('description', get_lang('Description'), false, false, array('Width' => '95%', 'Height' => '250'));
$form->addElement('style_submit_button', 'submit', get_lang('Add'), 'class="add"');
// Setting the rules
@@ -147,7 +147,7 @@ if (isset($_GET['action']) && $_GET['action'] == 'add') {
$form->addElement('header', '', get_lang('Modify'));
$form->addElement('hidden', 'id', intval($_GET['id']));
$form->addElement('text', 'name', get_lang('Name'), array('size' => '70'));
- $form->add_html_editor('description', get_lang('Description'), false, false, array('Width' => '95%', 'Height' => '250'));
+ $form->addHtmlEditor('description', get_lang('Description'), false, false, array('Width' => '95%', 'Height' => '250'));
$form->addElement('style_submit_button', 'submit', get_lang('Modify'), 'class="save"');
// Setting the defaults
diff --git a/main/announcements/announcements.php b/main/announcements/announcements.php
index 31166ba6dd..72fdd56dc5 100755
--- a/main/announcements/announcements.php
+++ b/main/announcements/announcements.php
@@ -311,7 +311,7 @@ switch ($action) {
$form->addElement('text', 'title', get_lang('EmailTitle'));
$form->addElement('hidden', 'id');
- $form->add_html_editor(
+ $form->addHtmlEditor(
'content',
get_lang('Description'),
false,
diff --git a/main/attendance/attendance_add.php b/main/attendance/attendance_add.php
index 299e2e54e7..55156297c7 100755
--- a/main/attendance/attendance_add.php
+++ b/main/attendance/attendance_add.php
@@ -30,7 +30,7 @@ $form->addElement('hidden', 'sec_token', $token);
$form->add_textfield('title', get_lang('Title'), true, array('size'=>'50'));
$form->applyFilter('title','html_filter');
-$form->add_html_editor('description', get_lang('Description'), false, false, array('ToolbarSet' => 'TrainingDescription', 'Width' => '100%', 'Height' => '150'));
+$form->addHtmlEditor('description', get_lang('Description'), false, false, array('ToolbarSet' => 'TrainingDescription', 'Width' => '100%', 'Height' => '150'));
// Adavanced Parameters
diff --git a/main/attendance/attendance_edit.php b/main/attendance/attendance_edit.php
index 48d281b1d2..a30863965b 100755
--- a/main/attendance/attendance_edit.php
+++ b/main/attendance/attendance_edit.php
@@ -33,7 +33,7 @@ $form->addElement('hidden', 'attendance_id', $attendance_id);
$form->add_textfield('title', get_lang('Title'), true, array('size'=>'50'));
$form->applyFilter('title','html_filter');
-$form->add_html_editor('description', get_lang('Description'), false, false, array('ToolbarSet' => 'TrainingDescription', 'Width' => '100%', 'Height' => '200'));
+$form->addHtmlEditor('description', get_lang('Description'), false, false, array('ToolbarSet' => 'TrainingDescription', 'Width' => '100%', 'Height' => '200'));
// Adavanced Parameters
diff --git a/main/auth/inscription.php b/main/auth/inscription.php
index 787dda0abd..c22543a177 100755
--- a/main/auth/inscription.php
+++ b/main/auth/inscription.php
@@ -182,22 +182,22 @@ if ($user_already_registered_show_terms == false) {
if (api_get_setting('extended_profile') == 'true' &&
api_get_setting('extendedprofile_registration', 'mycomptetences') == 'true'
) {
- $form->add_html_editor('competences', get_lang('MyCompetences'), false, false, array('ToolbarSet' => 'register', 'Width' => '100%', 'Height' => '130'));
+ $form->addHtmlEditor('competences', get_lang('MyCompetences'), false, false, array('ToolbarSet' => 'register', 'Width' => '100%', 'Height' => '130'));
}
if (api_get_setting('extended_profile') == 'true' &&
api_get_setting('extendedprofile_registration', 'mydiplomas') == 'true'
) {
- $form->add_html_editor('diplomas', get_lang('MyDiplomas'), false, false, array('ToolbarSet' => 'register', 'Width' => '100%', 'Height' => '130'));
+ $form->addHtmlEditor('diplomas', get_lang('MyDiplomas'), false, false, array('ToolbarSet' => 'register', 'Width' => '100%', 'Height' => '130'));
}
if (api_get_setting('extended_profile') == 'true' &&
api_get_setting('extendedprofile_registration', 'myteach') == 'true'
) {
- $form->add_html_editor('teach', get_lang('MyTeach'), false, false, array('ToolbarSet' => 'register', 'Width' => '100%', 'Height' => '130'));
+ $form->addHtmlEditor('teach', get_lang('MyTeach'), false, false, array('ToolbarSet' => 'register', 'Width' => '100%', 'Height' => '130'));
}
if (api_get_setting('extended_profile') == 'true' &&
api_get_setting('extendedprofile_registration', 'mypersonalopenarea') == 'true'
) {
- $form->add_html_editor('openarea', get_lang('MyPersonalOpenArea'), false, false, array('ToolbarSet' => 'register', 'Width' => '100%', 'Height' => '130'));
+ $form->addHtmlEditor('openarea', get_lang('MyPersonalOpenArea'), false, false, array('ToolbarSet' => 'register', 'Width' => '100%', 'Height' => '130'));
}
if (api_get_setting('extended_profile') == 'true') {
if (api_get_setting('extendedprofile_registration', 'mycomptetences') == 'true' &&
diff --git a/main/auth/profile.php b/main/auth/profile.php
index 7082ab4e31..3fc3213c8e 100755
--- a/main/auth/profile.php
+++ b/main/auth/profile.php
@@ -233,11 +233,11 @@ if (api_get_setting('extended_profile') == 'true') {
//$form->addElement('html', ' show_extend_profile');
//$form->addElement('static', null, ''.get_lang('OptionalTextFields').'');
// MY COMPETENCES
- $form->add_html_editor('competences', get_lang('MyCompetences'), false, false, array('ToolbarSet' => 'Profile', 'Width' => $width_extended_profile, 'Height' => '130'));
+ $form->addHtmlEditor('competences', get_lang('MyCompetences'), false, false, array('ToolbarSet' => 'Profile', 'Width' => $width_extended_profile, 'Height' => '130'));
// MY DIPLOMAS
- $form->add_html_editor('diplomas', get_lang('MyDiplomas'), false, false, array('ToolbarSet' => 'Profile', 'Width' => $width_extended_profile, 'Height' => '130'));
+ $form->addHtmlEditor('diplomas', get_lang('MyDiplomas'), false, false, array('ToolbarSet' => 'Profile', 'Width' => $width_extended_profile, 'Height' => '130'));
// WHAT I AM ABLE TO TEACH
- $form->add_html_editor('teach', get_lang('MyTeach'), false, false, array('ToolbarSet' => 'Profile', 'Width' => $width_extended_profile, 'Height' => '130'));
+ $form->addHtmlEditor('teach', get_lang('MyTeach'), false, false, array('ToolbarSet' => 'Profile', 'Width' => $width_extended_profile, 'Height' => '130'));
// MY PRODUCTIONS
$form->addElement('file', 'production', get_lang('MyProductions'));
@@ -245,7 +245,7 @@ if (api_get_setting('extended_profile') == 'true') {
$form->addElement('static', 'productions_list', null, $production_list);
}
// MY PERSONAL OPEN AREA
- $form->add_html_editor('openarea', get_lang('MyPersonalOpenArea'), false, false, array('ToolbarSet' => 'Profile', 'Width' => $width_extended_profile, 'Height' => '350'));
+ $form->addHtmlEditor('openarea', get_lang('MyPersonalOpenArea'), false, false, array('ToolbarSet' => 'Profile', 'Width' => $width_extended_profile, 'Height' => '350'));
$form->applyFilter(array('competences', 'diplomas', 'teach', 'openarea'), 'stripslashes');
$form->applyFilter(array('competences', 'diplomas', 'teach'), 'trim'); // openarea is untrimmed for maximum openness
diff --git a/main/course_description/add.php b/main/course_description/add.php
index 12a7acb49d..339c5e2a27 100755
--- a/main/course_description/add.php
+++ b/main/course_description/add.php
@@ -54,7 +54,7 @@ $form->addElement('hidden', 'description_type',$description_type);
$form->addElement('hidden', 'sec_token',$token);
$form->add_textfield('title', get_lang('Title'), true, array('size'=>'width: 350px;'));
$form->applyFilter('title','html_filter');
-$form->add_html_editor('contentDescription', get_lang('Content'), true, false, array('ToolbarSet' => 'TrainingDescription', 'Width' => '100%', 'Height' => '200'));
+$form->addHtmlEditor('contentDescription', get_lang('Content'), true, false, array('ToolbarSet' => 'TrainingDescription', 'Width' => '100%', 'Height' => '200'));
$form->addElement('style_submit_button', null, get_lang('Save'), 'class="save"');
// display default questions
diff --git a/main/course_description/course_description_form.class.php b/main/course_description/course_description_form.class.php
index 2546b778e1..e207f06e0f 100755
--- a/main/course_description/course_description_form.class.php
+++ b/main/course_description/course_description_form.class.php
@@ -76,8 +76,8 @@ class CourseDescriptionForm extends \FormValidator
$this->addHidden('id', $description->id);
$this->add_textfield('title', get_lang('Title'), true, array('size' => 'width: 350px;'));
$this->applyFilter('title', 'html_filter');
- $this->add_html_editor('content', get_lang('Content'), true, false, array('ToolbarSet' => 'TrainingDescription', 'Width' => '100%', 'Height' => '200'));
- $this->addButton('save', get_lang('Save'), 'class="save"');
+ $this->addHtmlEditor('content', get_lang('Content'), true, false, array('ToolbarSet' => 'TrainingDescription', 'Width' => '100%', 'Height' => '200'));
+ $this->addButton('save', get_lang('Save'));
$this->setDefaults($defaults);
}
diff --git a/main/course_description/edit.php b/main/course_description/edit.php
index 707c29f8d1..16d6fec8d5 100755
--- a/main/course_description/edit.php
+++ b/main/course_description/edit.php
@@ -58,7 +58,7 @@ $form->addElement('hidden', 'description_type',$description_type);
$form->addElement('hidden', 'sec_token',$token);
$form->add_textfield('title', get_lang('Title'), true, array('size'=>'50'));
$form->applyFilter('title','html_filter');
-$form->add_html_editor('contentDescription', get_lang('Content'), true, false, array('ToolbarSet' => 'TrainingDescription', 'Width' => '100%', 'Height' => '200'));
+$form->addHtmlEditor('contentDescription', get_lang('Content'), true, false, array('ToolbarSet' => 'TrainingDescription', 'Width' => '100%', 'Height' => '200'));
$form->addElement('style_submit_button', null, get_lang('Save'), 'class="save"');
// Set some default values
diff --git a/main/course_progress/thematic.php b/main/course_progress/thematic.php
index e32a81cb23..25384fcab8 100755
--- a/main/course_progress/thematic.php
+++ b/main/course_progress/thematic.php
@@ -253,7 +253,7 @@ if ($action == 'thematic_list') {
}
$form->add_textfield('title', get_lang('Title'), true, array('size'=>'50'));
- $form->add_html_editor('content', get_lang('Content'), false, false, array('ToolbarSet' => 'TrainingDescription', 'Width' => '80%', 'Height' => '150'));
+ $form->addHtmlEditor('content', get_lang('Content'), false, false, array('ToolbarSet' => 'TrainingDescription', 'Width' => '80%', 'Height' => '150'));
$form->addElement('style_submit_button', null, get_lang('Save'), 'class="save"');
$show_form = true;
diff --git a/main/course_progress/thematic_advance.php b/main/course_progress/thematic_advance.php
index 6c352340d2..c8dd5e7bb3 100755
--- a/main/course_progress/thematic_advance.php
+++ b/main/course_progress/thematic_advance.php
@@ -72,7 +72,7 @@ if ($action == 'thematic_advance_add' || $action == 'thematic_advance_edit') {
$form->add_textfield('duration_in_hours', get_lang('DurationInHours'), false, array('size'=>'3','id'=>'duration_in_hours_element', 'autofocus' => 'autofocus'));
- $form->add_html_editor('content', get_lang('Content'), false, false, array('ToolbarStartExpanded'=>'false', 'ToolbarSet' => 'TrainingDescription', 'Width' => '80%', 'Height' => '150'));
+ $form->addHtmlEditor('content', get_lang('Content'), false, false, array('ToolbarStartExpanded'=>'false', 'ToolbarSet' => 'TrainingDescription', 'Width' => '80%', 'Height' => '150'));
//$form->addElement('textarea', 'content', get_lang('Content'));
if ($action == 'thematic_advance_add') {
diff --git a/main/course_progress/thematic_plan.php b/main/course_progress/thematic_plan.php
index aab3459234..364c0780a3 100755
--- a/main/course_progress/thematic_plan.php
+++ b/main/course_progress/thematic_plan.php
@@ -41,7 +41,7 @@ if ($action == 'thematic_plan_list') {
foreach ($default_thematic_plan_title as $id => $title) {
$form->addElement('hidden', 'description_type['.$id.']', $id);
$form->add_textfield('title['.$id.']', get_lang('Title'), false, array('size'=>'50'));
- $form->add_html_editor('description['.$id.']', get_lang('Description'), false, false, array('ToolbarStartExpanded'=>'false', 'ToolbarSet' => 'TrainingDescription', 'Width' => '80%', 'Height' => '150'));
+ $form->addHtmlEditor('description['.$id.']', get_lang('Description'), false, false, array('ToolbarStartExpanded'=>'false', 'ToolbarSet' => 'TrainingDescription', 'Width' => '80%', 'Height' => '150'));
//$form->addElement('textarea', 'description['.$id.']', get_lang('Description'));
if (!empty($thematic_simple_list) && in_array($id, $thematic_simple_list)) {
$thematic_plan = $new_thematic_plan_data[$id];
@@ -83,7 +83,7 @@ if ($action == 'thematic_plan_list') {
}
$form->add_textfield('title', get_lang('Title'), true, array('size'=>'50'));
- $form->add_html_editor('description', get_lang('Description'), false, false, array('ToolbarStartExpanded'=>'false', 'ToolbarSet' => 'TrainingDescription', 'Width' => '80%', 'Height' => '150'));
+ $form->addHtmlEditor('description', get_lang('Description'), false, false, array('ToolbarStartExpanded'=>'false', 'ToolbarSet' => 'TrainingDescription', 'Width' => '80%', 'Height' => '150'));
//$form->addElement('html','');
$form->addElement('style_submit_button', null, get_lang('Save'), 'class="save"');
diff --git a/main/document/create_document.php b/main/document/create_document.php
index 0cabf0e8b6..753a7adc4a 100755
--- a/main/document/create_document.php
+++ b/main/document/create_document.php
@@ -289,7 +289,7 @@ $form->addRule('title', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('title', get_lang('FileExists'), 'callback', 'document_exists');
$current_session_id = api_get_session_id();
-$form->add_html_editor('content','', false, false, $html_editor_config);
+$form->addHtmlEditor('content','', false, false, $html_editor_config);
// Comment-field
$folders = DocumentManager::get_all_document_folders($_course, $to_group_id, $is_allowed_to_edit);
diff --git a/main/document/edit_document.php b/main/document/edit_document.php
index 40e89652d4..c4a409a6f2 100755
--- a/main/document/edit_document.php
+++ b/main/document/edit_document.php
@@ -463,7 +463,7 @@ if ($owner_id == api_get_user_id() ||
if (($extension == 'htm' || $extension == 'html') && $condition) {
if (empty($readonly) && $readonly == 0) {
- $form->add_html_editor('content', '', false, false, $html_editor_config);
+ $form->addHtmlEditor('content', '', false, false, $html_editor_config);
}
}
diff --git a/main/exercice/exercise.class.php b/main/exercice/exercise.class.php
index 86fa66857d..e57d0f4d50 100755
--- a/main/exercice/exercise.class.php
+++ b/main/exercice/exercise.class.php
@@ -1019,7 +1019,7 @@ class Exercise
}
$form->addElement ('html','');
- $form->add_html_editor('exerciseDescription', get_lang('ExerciseDescription'), false, false, $editor_config);
+ $form->addHtmlEditor('exerciseDescription', get_lang('ExerciseDescription'), false, false, $editor_config);
$form->addElement ('html','
');
$form->addElement('advanced_settings','
@@ -1197,7 +1197,7 @@ class Exercise
$form->addRule('pass_percentage', get_lang('Numeric'), 'numeric');
// add the text_when_finished textbox
- $form -> add_html_editor('text_when_finished', get_lang('TextWhenFinished'), false, false, $editor_config);
+ $form -> addHtmlEditor('text_when_finished', get_lang('TextWhenFinished'), false, false, $editor_config);
$defaults = array();
diff --git a/main/exercice/feedback.php b/main/exercice/feedback.php
index 483060ce0b..f4421bcf9e 100755
--- a/main/exercice/feedback.php
+++ b/main/exercice/feedback.php
@@ -61,7 +61,7 @@ Display::display_header($nameTools,"Exercise");
{error}
');
- $form->add_html_editor('Feedback', $i.'.'.$ans, false, false, array('ToolbarSet' => 'TestAnswerFeedback', 'Width' => '600', 'Height' => '200'));
+ $form->addHtmlEditor('Feedback', $i.'.'.$ans, false, false, array('ToolbarSet' => 'TestAnswerFeedback', 'Width' => '600', 'Height' => '200'));
$form->display();
echo "";
}?>
diff --git a/main/exercice/hotspot_admin.inc.php b/main/exercice/hotspot_admin.inc.php
index e2fa718c29..a3b86b75be 100755
--- a/main/exercice/hotspot_admin.inc.php
+++ b/main/exercice/hotspot_admin.inc.php
@@ -830,7 +830,7 @@ if ($modifyAnswers) {
$config = array(
'ToolbarSet' => 'TestProposedAnswer'
);
- $form->add_html_editor('comment['.$i.']', null, false, false, $config);
+ $form->addHtmlEditor('comment['.$i.']', null, false, false, $config);
$renderer = $form->defaultRenderer();
$form_template = '{content}';
$renderer->setFormTemplate($form_template);
diff --git a/main/exercice/question.class.php b/main/exercice/question.class.php
index b569f9a405..ac1f532f71 100755
--- a/main/exercice/question.class.php
+++ b/main/exercice/question.class.php
@@ -1255,7 +1255,7 @@ abstract class Question
');
$form->addElement ('html','');
- $form->add_html_editor('questionDescription', get_lang('QuestionDescription'), false, false, $editor_config);
+ $form->addHtmlEditor('questionDescription', get_lang('QuestionDescription'), false, false, $editor_config);
$form->addElement ('html','
');
// hidden values
diff --git a/main/exercice/tests_category.php b/main/exercice/tests_category.php
index aefcb0d771..2f3e91c897 100755
--- a/main/exercice/tests_category.php
+++ b/main/exercice/tests_category.php
@@ -73,7 +73,7 @@ function edit_category_form($in_action) {
$form->addElement('header', get_lang('EditCategory'));
$form->addElement('hidden', 'category_id');
$form->addElement('text', 'category_name', get_lang('CategoryName'), array('size' => '95'));
- $form->add_html_editor('category_description', get_lang('CategoryDescription'), false, false, array('ToolbarSet' => 'test_category', 'Width' => '90%', 'Height' => '200'));
+ $form->addHtmlEditor('category_description', get_lang('CategoryDescription'), false, false, array('ToolbarSet' => 'test_category', 'Width' => '90%', 'Height' => '200'));
$form->addElement('style_submit_button', 'SubmitNote', get_lang('ModifyCategory'), 'class="add"');
// setting the defaults
@@ -141,7 +141,7 @@ function add_category_form($in_action) {
// Setting the form elements
$form->addElement('header', get_lang('AddACategory'));
$form->addElement('text', 'category_name', get_lang('CategoryName'), array('size' => '95'));
- $form->add_html_editor('category_description', get_lang('CategoryDescription'), false, false, array('ToolbarSet' => 'test_category', 'Width' => '90%', 'Height' => '200'));
+ $form->addHtmlEditor('category_description', get_lang('CategoryDescription'), false, false, array('ToolbarSet' => 'test_category', 'Width' => '90%', 'Height' => '200'));
$form->addElement('style_submit_button', 'SubmitNote', get_lang('AddTestCategory'), 'class="add"');
// setting the rules
$form->addRule('category_name', get_lang('ThisFieldIsRequired'), 'required');
diff --git a/main/glossary/glossary_form.class.php b/main/glossary/glossary_form.class.php
index ed7973b0c2..5fbc2f7906 100755
--- a/main/glossary/glossary_form.class.php
+++ b/main/glossary/glossary_form.class.php
@@ -77,8 +77,8 @@ class GlossaryForm extends \FormValidator
$this->addHeader($form_name);
$this->add_textfield('name', get_lang('TermName'), $required = true, array('class' => 'span3'));
- $this->add_html_editor('description', get_lang('TermDefinition'), true, array('ToolbarSet' => 'Glossary', 'Width' => '90%', 'Height' => '300'));
- $this->addButton('save', get_lang('Save'), array('class' => 'btn save'));
+ $this->addHtmlEditor('description', get_lang('TermDefinition'), true, array('ToolbarSet' => 'Glossary', 'Width' => '90%', 'Height' => '300'));
+ $this->addButton('save', get_lang('Save'));
$this->setDefaults($defaults);
}
diff --git a/main/help/faq.php b/main/help/faq.php
index d208b42858..b2d6a1d948 100755
--- a/main/help/faq.php
+++ b/main/help/faq.php
@@ -27,7 +27,7 @@ echo Display::page_header(get_lang('Faq'));
$faq_file = 'faq.html';
if (!empty($_GET['edit']) && $_GET['edit'] == 'true' && api_is_platform_admin()) {
$form = new FormValidator('set_faq', 'post', 'faq.php?edit=true');
- $form->add_html_editor('faq_content', null, false, false, array('ToolbarSet' => 'FAQ', 'Width' => '100%', 'Height' => '300'));
+ $form->addHtmlEditor('faq_content', null, false, false, array('ToolbarSet' => 'FAQ', 'Width' => '100%', 'Height' => '300'));
$form->addElement('style_submit_button', 'faq_submit', get_lang('Ok'));
$faq_content = @(string)file_get_contents(api_get_path(SYS_PATH).'home/faq.html');
$faq_content = api_to_system_encoding($faq_content, api_detect_encoding(strip_tags($faq_content)));
diff --git a/main/inc/lib/blog.lib.php b/main/inc/lib/blog.lib.php
index 6078c80c17..dadadff4b4 100755
--- a/main/inc/lib/blog.lib.php
+++ b/main/inc/lib/blog.lib.php
@@ -1123,7 +1123,7 @@ class Blog
} else {
$config['ToolbarSet'] = 'Project';
}
- $form->add_html_editor('full_text', get_lang('Content'), false, false, $config);
+ $form->addHtmlEditor('full_text', get_lang('Content'), false, false, $config);
$form->add_file('user_upload', get_lang('AddAnAttachment'));
$form->add_textarea('post_file_comment', get_lang('FileComment'));
$form->addHidden('new_post_submit', 'true');
@@ -1176,7 +1176,7 @@ class Blog
} else {
$config['ToolbarSet'] = 'Project';
}
- $form->add_html_editor('full_text', get_lang('Content'), false, false, $config);
+ $form->addHtmlEditor('full_text', get_lang('Content'), false, false, $config);
$form->addHidden('action', '');
$form->addHidden('edit_post_submit', 'true');
@@ -2225,7 +2225,7 @@ class Blog
} else {
$config['ToolbarSet'] = 'ProjectCommentStudent';
}
- $form->add_html_editor('comment', get_lang('Comment'), false, false, $config);
+ $form->addHtmlEditor('comment', get_lang('Comment'), false, false, $config);
$form->add_file('user_upload', get_lang('AddAnAttachment'));
$form->add_textarea('post_file_comment', get_lang('FileComment'));
diff --git a/main/inc/lib/career.lib.php b/main/inc/lib/career.lib.php
index d7a665dffb..c0427a6d54 100755
--- a/main/inc/lib/career.lib.php
+++ b/main/inc/lib/career.lib.php
@@ -103,7 +103,7 @@ class Career extends Model
$form->addElement('hidden', 'id', $id);
$form->addElement('text', 'name', get_lang('Name'), array('size' => '70'));
- $form->add_html_editor(
+ $form->addHtmlEditor(
'description',
get_lang('Description'),
false,
diff --git a/main/inc/lib/event_email_template.class.php b/main/inc/lib/event_email_template.class.php
index 4e7a3964e3..2f42578a52 100755
--- a/main/inc/lib/event_email_template.class.php
+++ b/main/inc/lib/event_email_template.class.php
@@ -69,7 +69,7 @@ class EventEmailTemplate extends Model {
$form->addElement('hidden', 'id', $id);
$form->addElement('text', 'name', get_lang('Name'), array('size' => '70'));
- $form->add_html_editor('description', get_lang('Description'), false, false, array('ToolbarSet' => 'careers','Width' => '100%', 'Height' => '250'));
+ $form->addHtmlEditor('description', get_lang('Description'), false, false, array('ToolbarSet' => 'careers','Width' => '100%', 'Height' => '250'));
$status_list = $this->get_status_list();
$form->addElement('select', 'status', get_lang('Status'), $status_list);
if ($action == 'edit') {
diff --git a/main/inc/lib/exercise.lib.php b/main/inc/lib/exercise.lib.php
index 1cc3be5acf..7091d6277a 100644
--- a/main/inc/lib/exercise.lib.php
+++ b/main/inc/lib/exercise.lib.php
@@ -158,7 +158,7 @@ class ExerciseLib
$config = array(
'ToolbarSet' => 'TestFreeAnswer'
);
- $form->add_html_editor("choice[" . $questionId . "]", null, false, false, $config);
+ $form->addHtmlEditor("choice[" . $questionId . "]", null, false, false, $config);
$form->setDefaults(array("choice[" . $questionId . "]" => $fck_content));
$s .= $form->return_form();
} elseif ($answerType == ORAL_EXPRESSION) {
@@ -188,7 +188,7 @@ class ExerciseLib
$config = array(
'ToolbarSet' => 'TestFreeAnswer'
);
- $form->add_html_editor("choice[" . $questionId . "]", null, false, false, $config);
+ $form->addHtmlEditor("choice[" . $questionId . "]", null, false, false, $config);
//$form->setDefaults(array("choice[" . $questionId . "]" => $fck_content));
$s .= $form->return_form();
}
diff --git a/main/inc/lib/extra_field.lib.php b/main/inc/lib/extra_field.lib.php
index 058b1929db..6a1ff2418c 100755
--- a/main/inc/lib/extra_field.lib.php
+++ b/main/inc/lib/extra_field.lib.php
@@ -629,7 +629,7 @@ class ExtraField extends Model
}
break;
case ExtraField::FIELD_TYPE_TEXTAREA:
- $form->add_html_editor(
+ $form->addHtmlEditor(
'extra_'.$field_details['field_variable'],
$field_details['field_display_text'],
false,
diff --git a/main/inc/lib/formvalidator/Element/HtmlEditor.php b/main/inc/lib/formvalidator/Element/HtmlEditor.php
index 3bdc79604f..f69d86a1e5 100644
--- a/main/inc/lib/formvalidator/Element/HtmlEditor.php
+++ b/main/inc/lib/formvalidator/Element/HtmlEditor.php
@@ -19,15 +19,19 @@ class HtmlEditor extends HTML_QuickForm_textarea
var $content;
/**
- * Class constructor
- * @param string HTML editor name/id
- * @param string HTML editor label
- * @param array Attributes for the textarea
- * @param array $config Optional configuration settings for the online editor.
+ * Class Constructor
+ * @param string $name
+ * @param string $elementLabel HTML editor label
+ * @param array $attributes Attributes for the textarea
+ * @param array $config Optional configuration settings for the online editor.
* @return bool
*/
- public function HtmlEditor($name = null, $elementLabel = null, $attributes = null, $config = null)
- {
+ public function HtmlEditor(
+ $name = null,
+ $elementLabel = null,
+ $attributes = null,
+ $config = array()
+ ) {
if (empty($name)) {
return false;
}
diff --git a/main/inc/lib/grade_model.lib.php b/main/inc/lib/grade_model.lib.php
index 78f3c7b073..06f559e123 100755
--- a/main/inc/lib/grade_model.lib.php
+++ b/main/inc/lib/grade_model.lib.php
@@ -72,7 +72,7 @@ class GradeModel extends Model
$form->addElement('hidden', 'id', $id);
$form->addElement('text', 'name', get_lang('Name'), array('size' => '70'));
- $form->add_html_editor(
+ $form->addHtmlEditor(
'description',
get_lang('Description'),
false,
diff --git a/main/inc/lib/plugin.class.php b/main/inc/lib/plugin.class.php
index dae54de85c..0e305e00a8 100755
--- a/main/inc/lib/plugin.class.php
+++ b/main/inc/lib/plugin.class.php
@@ -202,7 +202,7 @@ class Plugin
$result->addElement('html', $this->get_lang($name));
break;
case 'wysiwyg':
- $result->add_html_editor($name, $this->get_lang($name));
+ $result->addHtmlEditor($name, $this->get_lang($name));
break;
case 'text':
$result->addElement($type, $name, array($this->get_lang($name), $help));
diff --git a/main/inc/lib/promotion.lib.php b/main/inc/lib/promotion.lib.php
index f4251c330b..e316edccec 100755
--- a/main/inc/lib/promotion.lib.php
+++ b/main/inc/lib/promotion.lib.php
@@ -167,7 +167,7 @@ class Promotion extends Model
$form->addElement('header', '', $header);
$form->addElement('hidden', 'id', $id);
$form->addElement('text', 'name', get_lang('Name'), array('size' => '70','id' => 'name'));
- $form->add_html_editor(
+ $form->addHtmlEditor(
'description',
get_lang('Description'),
false,
diff --git a/main/inc/lib/timeline.lib.php b/main/inc/lib/timeline.lib.php
index 6f291c3127..a5700cbe39 100755
--- a/main/inc/lib/timeline.lib.php
+++ b/main/inc/lib/timeline.lib.php
@@ -88,7 +88,7 @@ class Timeline extends Model
$form->addElement('hidden', 'id', $id);
$form->addElement('text', 'headline', get_lang('Name'), array('size' => '70'));
- //$form->add_html_editor('description', get_lang('Description'), false, false, array('ToolbarSet' => 'careers','Width' => '100%', 'Height' => '250'));
+ //$form->addHtmlEditor('description', get_lang('Description'), false, false, array('ToolbarSet' => 'careers','Width' => '100%', 'Height' => '250'));
$status_list = $this->get_status_list();
$form->addElement('select', 'status', get_lang('Status'), $status_list);
if ($action == 'edit') {
@@ -153,7 +153,7 @@ class Timeline extends Model
$form->addRule('start_date', get_lang('ThisFieldIsRequired'), 'required');
- //$form->add_html_editor('description', get_lang('Description'), false, false, array('ToolbarSet' => 'careers','Width' => '100%', 'Height' => '250'));
+ //$form->addHtmlEditor('description', get_lang('Description'), false, false, array('ToolbarSet' => 'careers','Width' => '100%', 'Height' => '250'));
if ($action == 'edit') {
// Setting the defaults
diff --git a/main/inc/lib/usermanager.lib.php b/main/inc/lib/usermanager.lib.php
index c778189141..2810cad9d2 100755
--- a/main/inc/lib/usermanager.lib.php
+++ b/main/inc/lib/usermanager.lib.php
@@ -4652,7 +4652,7 @@ class UserManager
}
break;
case self::USER_FIELD_TYPE_TEXTAREA:
- $form->add_html_editor(
+ $form->addHtmlEditor(
'extra_'.$field_details[1],
$field_details[3],
false,
diff --git a/main/messages/new_message.php b/main/messages/new_message.php
index b3778a7b89..6f41d7a895 100755
--- a/main/messages/new_message.php
+++ b/main/messages/new_message.php
@@ -200,7 +200,7 @@ function manage_form($default, $select_from_user_list = null, $sent_to = null) {
}
$form->add_textfield('title', get_lang('Subject'), true, array('class' => 'span4'));
- $form->add_html_editor('content', get_lang('Message'), false, false, array('ToolbarSet' => 'Messages', 'Width' => '95%', 'Height' => '250'));
+ $form->addHtmlEditor('content', get_lang('Message'), false, false, array('ToolbarSet' => 'Messages', 'Width' => '95%', 'Height' => '250'));
if (isset($_GET['re_id'])) {
$message_reply_info = MessageManager::get_message_by_id($_GET['re_id']);
diff --git a/main/social/message_for_group_form.inc.php b/main/social/message_for_group_form.inc.php
index e37f35345b..d18517db31 100755
--- a/main/social/message_for_group_form.inc.php
+++ b/main/social/message_for_group_form.inc.php
@@ -98,7 +98,7 @@ if (api_get_setting('allow_message_tool') == 'true') {
$config = array();
$config['ToolbarSet'] = 'Messages';
- $form->add_html_editor(
+ $form->addHtmlEditor(
'content',
get_lang('Content'),
false,
diff --git a/main/wiki/wiki.inc.php b/main/wiki/wiki.inc.php
index 33c540a711..962d79a7f3 100755
--- a/main/wiki/wiki.inc.php
+++ b/main/wiki/wiki.inc.php
@@ -598,7 +598,7 @@ class Wiki
? array('ToolbarSet' => 'Wiki', 'Width' => '100%', 'Height' => '400')
: array('ToolbarSet' => 'WikiStudent', 'Width' => '100%', 'Height' => '400', 'UserStatus' => 'student');
- $form->add_html_editor('content', get_lang('Content'), false, false, $toolBar);
+ $form->addHtmlEditor('content', get_lang('Content'), false, false, $toolBar);
//$content
$form->addElement('text', 'comment', get_lang('Comments'));
$progress = array('', 10, 20, 30, 40, 50, 60, 70, 80, 90, 100);
@@ -618,7 +618,7 @@ class Wiki
$form->addElement('advanced_settings', $advanced);
$form->addElement('html', '');
- $form->add_html_editor('task', get_lang('DescriptionOfTheTask'), false, false, array('ToolbarSet' => 'wiki_task', 'Width' => '100%', 'Height' => '200'));
+ $form->addHtmlEditor('task', get_lang('DescriptionOfTheTask'), false, false, array('ToolbarSet' => 'wiki_task', 'Width' => '100%', 'Height' => '200'));
$form->addElement('label', null, get_lang('AddFeedback'));
$form->addElement('textarea', 'feedback1', get_lang('Feedback1'));
diff --git a/main/work/edit.php b/main/work/edit.php
index 87f389bdc9..42cb877aa6 100755
--- a/main/work/edit.php
+++ b/main/work/edit.php
@@ -176,7 +176,7 @@ if ($is_allowed_to_edit && !empty($item_id)) {
}
}
}
-$form->add_html_editor('description', get_lang('Description'), false, false, getWorkDescriptionToolbar());
+$form->addHtmlEditor('description', get_lang('Description'), false, false, getWorkDescriptionToolbar());
$defaults['title'] = $work_item['title'];
$defaults["description"] = $work_item['description'];
diff --git a/main/work/work.lib.php b/main/work/work.lib.php
index f98e0017dd..9bdc56d815 100755
--- a/main/work/work.lib.php
+++ b/main/work/work.lib.php
@@ -3743,11 +3743,11 @@ function setWorkUploadForm($form, $uploadFormType = 0)
// File and text.
$form->addElement('file', 'file', get_lang('UploadADocument'), 'size="40" onchange="updateDocumentTitle(this.value)"');
$form->add_real_progress_bar('uploadWork', 'file');
- $form->add_html_editor('description', get_lang('Description'), false, false, getWorkDescriptionToolbar());
+ $form->addHtmlEditor('description', get_lang('Description'), false, false, getWorkDescriptionToolbar());
break;
case 1:
// Only text.
- $form->add_html_editor('description', get_lang('Description'), false, false, getWorkDescriptionToolbar());
+ $form->addHtmlEditor('description', get_lang('Description'), false, false, getWorkDescriptionToolbar());
$form->addRule('description', get_lang('ThisFieldIsRequired'), 'required');
break;
case 2:
@@ -4368,7 +4368,7 @@ function getFormWork($form, $defaults = array())
// Create the form that asks for the directory name
$form->addElement('text', 'new_dir', get_lang('AssignmentName'));
$form->addRule('new_dir', get_lang('ThisFieldIsRequired'), 'required');
- $form->add_html_editor('description', get_lang('Description'), false, false, getWorkDescriptionToolbar());
+ $form->addHtmlEditor('description', get_lang('Description'), false, false, getWorkDescriptionToolbar());
$form->addElement(
'advanced_settings',
'
diff --git a/plugin/ticket/src/new_ticket.php b/plugin/ticket/src/new_ticket.php
index af3c273309..33ec6ad3ec 100755
--- a/plugin/ticket/src/new_ticket.php
+++ b/plugin/ticket/src/new_ticket.php
@@ -362,7 +362,7 @@ function show_form_send_ticket()
)
);
- $form->add_html_editor(
+ $form->addHtmlEditor(
'content',
get_lang('Message'),
false,
diff --git a/plugin/ticket/src/ticket_details.php b/plugin/ticket/src/ticket_details.php
index 69a61456e0..2272d28167 100755
--- a/plugin/ticket/src/ticket_details.php
+++ b/plugin/ticket/src/ticket_details.php
@@ -414,7 +414,7 @@ function show_form_send_message()
$form->addElement('hidden', 'ticket_id', $_GET['ticket_id']);
- $form->add_html_editor(
+ $form->addHtmlEditor(
'content',
get_lang('Message'),
false,