Skip to content

Commit

Permalink
Use html editor instead of textarea in the course legal agreement.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Aug 11, 2021
1 parent 7f8b875 commit 0b44069
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion main/course_info/infocours.php
Expand Up @@ -288,7 +288,8 @@ function is_settings_editable()
[null, get_lang('ShowALegalNoticeWhenEnteringTheCourse')],
get_lang('ActivateLegal')
);
$textAreaLegal = $form->createElement('textarea', 'legal', get_lang('CourseLegalAgreement'), ['rows' => 8]);

$textAreaLegal = $form->createElement('html_editor', 'legal', get_lang('CourseLegalAgreement'), ['rows' => 8]);

$elements = [
$groupElement,
Expand Down
4 changes: 2 additions & 2 deletions main/course_info/legal.php
Expand Up @@ -23,7 +23,7 @@
$pluginExtra = null;
$pluginLegal = false;

if ('true' == $enabled) {
if ('true' === $enabled) {
$pluginLegal = true;
require_once api_get_path(SYS_PLUGIN_PATH).'courselegal/config.php';
$plugin = CourseLegalPlugin::create();
Expand Down Expand Up @@ -64,7 +64,7 @@
}
}
$form->addElement('header', get_lang('CourseLegalAgreement'));
$form->addElement('label', null, $course_legal);
$form->addLabel(null, Security::remove_XSS($course_legal));
if ($pluginLegal && !empty($plugin)) {
$form->addElement('label', null, $plugin->getCurrentFile($course_info['real_id'], $session_id));
}
Expand Down

0 comments on commit 0b44069

Please sign in to comment.