Ckeditor - Rename add_html_editor to addHtmlEditor

1.10.x
Julio Montoya 11 years ago
parent 298e41b0b9
commit 1dced7680b
  1. 6
      main/admin/configure_homepage.php
  2. 10
      main/admin/configure_inscription.php
  3. 2
      main/admin/legal_add.php
  4. 2
      main/admin/system_announcements.php
  5. 4
      main/admin/usergroups.php
  6. 2
      main/announcements/announcements.php
  7. 2
      main/attendance/attendance_add.php
  8. 2
      main/attendance/attendance_edit.php
  9. 8
      main/auth/inscription.php
  10. 8
      main/auth/profile.php
  11. 2
      main/course_description/add.php
  12. 4
      main/course_description/course_description_form.class.php
  13. 2
      main/course_description/edit.php
  14. 2
      main/course_progress/thematic.php
  15. 2
      main/course_progress/thematic_advance.php
  16. 4
      main/course_progress/thematic_plan.php
  17. 2
      main/document/create_document.php
  18. 2
      main/document/edit_document.php
  19. 4
      main/exercice/exercise.class.php
  20. 2
      main/exercice/feedback.php
  21. 2
      main/exercice/hotspot_admin.inc.php
  22. 2
      main/exercice/question.class.php
  23. 4
      main/exercice/tests_category.php
  24. 4
      main/glossary/glossary_form.class.php
  25. 2
      main/help/faq.php
  26. 6
      main/inc/lib/blog.lib.php
  27. 2
      main/inc/lib/career.lib.php
  28. 2
      main/inc/lib/event_email_template.class.php
  29. 4
      main/inc/lib/exercise.lib.php
  30. 2
      main/inc/lib/extra_field.lib.php
  31. 18
      main/inc/lib/formvalidator/Element/HtmlEditor.php
  32. 2
      main/inc/lib/grade_model.lib.php
  33. 2
      main/inc/lib/plugin.class.php
  34. 2
      main/inc/lib/promotion.lib.php
  35. 4
      main/inc/lib/timeline.lib.php
  36. 2
      main/inc/lib/usermanager.lib.php
  37. 2
      main/messages/new_message.php
  38. 2
      main/social/message_for_group_form.inc.php
  39. 4
      main/wiki/wiki.inc.php
  40. 2
      main/work/edit.php
  41. 6
      main/work/work.lib.php
  42. 2
      plugin/ticket/src/new_ticket.php
  43. 2
      plugin/ticket/src/ticket_details.php

@ -864,12 +864,12 @@ switch ($action) {
if ($action == 'edit_link' && (empty($link_url) || $link_url == 'http://' || $link_url == 'https://')) {
$default['link_html'] = isset($_POST['link_html']) ? $_POST['link_html'] : $link_html;
$form->add_html_editor('link_html', get_lang('Content'), false, false, array('ToolbarSet' => 'PortalHomePage', 'Width' => '100%', 'Height' => '400'));
$form->addHtmlEditor('link_html', get_lang('Content'), false, false, array('ToolbarSet' => 'PortalHomePage', 'Width' => '100%', 'Height' => '400'));
$form->addElement('style_submit_button', null, get_lang('Save'), 'class="save"');
} else {
if (in_array($action, array('edit_tabs','insert_tabs'))) {
$default['link_html'] = isset($_POST['link_html']) ? $_POST['link_html'] : (!empty($link_html) ? $link_html : '');
$form->add_html_editor('link_html', get_lang('Content'), false, false, array('ToolbarSet' => 'PortalHomePage', 'Width' => '100%', 'Height' => '400'));
$form->addHtmlEditor('link_html', get_lang('Content'), false, false, array('ToolbarSet' => 'PortalHomePage', 'Width' => '100%', 'Height' => '400'));
}
$form->addElement('checkbox', 'all_langs', null, get_lang('ApplyAllLanguages'), array('id' => 'all_langs'));
$form->addElement('html','<table id="table_langs" style="margin-left:159px;"><tr>');
@ -941,7 +941,7 @@ switch ($action) {
}
$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('checkbox', 'all_langs', null, get_lang('ApplyAllLanguages'),array('id' => 'all_langs'));
$form->addElement('html','<table id="table_langs" style="margin-left:5px;"><tr>');

@ -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();

@ -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');

@ -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();

@ -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

@ -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,

@ -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

@ -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

@ -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' &&

@ -233,11 +233,11 @@ if (api_get_setting('extended_profile') == 'true') {
//$form->addElement('html', '<a href="javascript: void(0);" onclick="javascript: show_extend();"> show_extend_profile</a>');
//$form->addElement('static', null, '<em>'.get_lang('OptionalTextFields').'</em>');
// 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

@ -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

@ -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);
}

@ -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

@ -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;

@ -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') {

@ -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','<div class="clear" style="margin-top:50px;"></div>');
$form->addElement('style_submit_button', null, get_lang('Save'), 'class="save"');

@ -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);

@ -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);
}
}

@ -1019,7 +1019,7 @@ class Exercise
}
$form->addElement ('html','<div class="HideFCKEditor" id="HiddenFCKexerciseDescription" style="display:none" >');
$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','</div>');
$form->addElement('advanced_settings','<a href="javascript://" onclick=" return advanced_parameters()"><span id="img_plus_and_minus"><div style="vertical-align:top;" >
@ -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();

@ -61,7 +61,7 @@ Display::display_header($nameTools,"Exercise");
<!-- BEGIN error --><br /><span style="color: #ff0000;font-size:10px">{error}</span><!-- END error -->
</td>
</tr>');
$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 "</td>";
}?>

@ -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);

@ -1255,7 +1255,7 @@ abstract class Question
');
$form->addElement ('html','<div class="HideFCKEditor" id="HiddenFCKquestionDescription" >');
$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','</div>');
// hidden values

@ -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');

@ -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);
}

@ -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)));

@ -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'));

@ -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,

@ -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') {

@ -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();
}

@ -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,

@ -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;
}

@ -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,

@ -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));

@ -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,

@ -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

@ -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,

@ -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']);

@ -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,

@ -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', '<div id="options" style="display:none">');
$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'));

@ -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'];

@ -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',
'<a href="javascript: void(0);" onclick="javascript: return plus();">

@ -362,7 +362,7 @@ function show_form_send_ticket()
)
);
$form->add_html_editor(
$form->addHtmlEditor(
'content',
get_lang('Message'),
false,

@ -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,

Loading…
Cancel
Save