From 156f483ffc17d73a068809f88e116ac3d2c6e7ff Mon Sep 17 00:00:00 2001 From: David Bogner Date: Fri, 25 Jun 2021 06:38:10 +0200 Subject: [PATCH] Solve problem using data attr. in field renderer. Closes #164 --- renderer/renderer_form.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/renderer/renderer_form.php b/renderer/renderer_form.php index ddc9ee7c..fd17e03b 100644 --- a/renderer/renderer_form.php +++ b/renderer/renderer_form.php @@ -86,7 +86,7 @@ protected function definition() { $mform->addGroup($group, 'notvisiblegroup', get_string('notvisible', 'datalynx'), array('
' ), false); - $mform->setType('notvisibletemplate', PARAM_CLEANHTML); + $mform->setType('notvisibletemplate', PARAM_RAW); $mform->setDefault('notvisibleoptions', '___0___'); // Display template. @@ -99,7 +99,7 @@ protected function definition() { $mform->addGroup($group, 'displaytemplategroup', get_string('displaytemplate', 'datalynx'), array('
' ), false); - $mform->setType('displaytemplate', PARAM_CLEANHTML); + $mform->setType('displaytemplate', PARAM_RAW); $mform->addHelpButton('displaytemplategroup', 'displaytemplate', 'datalynx'); $mform->setDefault('displayoptions', '___4___'); @@ -115,7 +115,7 @@ protected function definition() { $mform->disabledIf('novaluetemplate', 'novalueoptions', 'eq', '___0___'); $mform->disabledIf('novaluetemplate', 'novalueoptions', 'eq', '___1___'); $mform->addGroup($group, 'novaluetemplategroup', get_string('novalue', 'datalynx'), array('
'), false); - $mform->setType('novaluetemplate', PARAM_CLEANHTML); + $mform->setType('novaluetemplate', PARAM_RAW); $mform->setDefault('novalueoptions', '___1___'); // Edit template. @@ -128,7 +128,7 @@ protected function definition() { $mform->disabledIf('edittemplate', 'editoptions', 'eq', '___1___'); $mform->disabledIf('edittemplate', 'editoptions', 'eq', '___4___'); $mform->addGroup($group, 'edittemplategroup', get_string('edittemplate', 'datalynx'), array('
'), false); - $mform->setType('edittemplate', PARAM_CLEANHTML); + $mform->setType('edittemplate', PARAM_RAW); $mform->addHelpButton('edittemplategroup', 'edittemplate', 'datalynx'); $mform->setDefault('editoptions', '___1___'); @@ -143,7 +143,7 @@ protected function definition() { $mform->disabledIf('noteditabletemplate', 'noteditableoptions', 'eq', '___1___'); $mform->disabledIf('noteditabletemplate', 'noteditableoptions', 'eq', '___3___'); $mform->addGroup($group, 'noteditablegroup', get_string('noteditable', 'datalynx'), array('
'), false); - $mform->setType('noteditabletemplate', PARAM_CLEANHTML); + $mform->setType('noteditabletemplate', PARAM_RAW); $mform->setDefault('noteditableoptions', '___1___'); $this->add_action_buttons();