#74 Ensure image element does not ignore 'showposxy' setting
This commit is contained in:
parent
a09fc76ef4
commit
e6f26a3661
1 changed files with 7 additions and 1 deletions
|
@ -64,6 +64,10 @@ class element extends \mod_customcert\element {
|
|||
$mform->setDefault('height', 0);
|
||||
$mform->addHelpButton('height', 'height', 'customcertelement_image');
|
||||
|
||||
if (get_config('customcert', 'showposxy')) {
|
||||
\mod_customcert\element_helper::render_form_element_position($mform);
|
||||
}
|
||||
|
||||
$mform->addElement('filemanager', 'customcertimage', get_string('uploadimage', 'customcert'), '', $this->filemanageroptions);
|
||||
}
|
||||
|
||||
|
@ -89,7 +93,9 @@ class element extends \mod_customcert\element {
|
|||
}
|
||||
|
||||
// Validate the position.
|
||||
$errors += \mod_customcert\element_helper::validate_form_element_position($data);
|
||||
if (get_config('customcert', 'showposxy')) {
|
||||
$errors += \mod_customcert\element_helper::validate_form_element_position($data);
|
||||
}
|
||||
|
||||
return $errors;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue