Removed the 'posx' and 'posy' form elements
This commit is contained in:
parent
ae80c03e36
commit
ed93542c0c
4 changed files with 0 additions and 32 deletions
|
@ -112,8 +112,6 @@ abstract class element {
|
|||
$element->font = (isset($data->font)) ? $data->font : null;
|
||||
$element->size = (isset($data->size)) ? $data->size : null;
|
||||
$element->colour = (isset($data->colour)) ? $data->colour : null;
|
||||
$element->posx = (isset($data->posx)) ? $data->posx : null;
|
||||
$element->posy = (isset($data->posy)) ? $data->posy : null;
|
||||
$element->width = (isset($data->width)) ? $data->width : null;
|
||||
$element->refpoint = (isset($data->refpoint)) ? $data->refpoint : null;
|
||||
$element->timemodified = time();
|
||||
|
|
|
@ -154,14 +154,6 @@ class element_helper {
|
|||
* @param \mod_customcert\edit_element_form $mform the edit_form instance.
|
||||
*/
|
||||
public static function render_form_element_position($mform) {
|
||||
$mform->addElement('text', 'posx', get_string('posx', 'customcert'), array('size' => 10));
|
||||
$mform->setType('posx', PARAM_INT);
|
||||
$mform->setDefault('posx', 0);
|
||||
$mform->addHelpButton('posx', 'posx', 'customcert');
|
||||
$mform->addElement('text', 'posy', get_string('posy', 'customcert'), array('size' => 10));
|
||||
$mform->setType('posy', PARAM_INT);
|
||||
$mform->setDefault('posy', 0);
|
||||
$mform->addHelpButton('posy', 'posy', 'customcert');
|
||||
$mform->addElement('text', 'width', get_string('elementwidth', 'customcert'), array('size' => 10));
|
||||
$mform->setType('width', PARAM_INT);
|
||||
$mform->setDefault('width', 0);
|
||||
|
@ -199,14 +191,6 @@ class element_helper {
|
|||
*/
|
||||
public static function validate_form_element_position($data) {
|
||||
$errors = array();
|
||||
// Check if posx is not set, or not numeric or less than 0.
|
||||
if ((!isset($data['posx'])) || (!is_numeric($data['posx'])) || ($data['posx'] < 0)) {
|
||||
$errors['posx'] = get_string('invalidposition', 'customcert', 'X');
|
||||
}
|
||||
// Check if posy is not set, or not numeric or less than 0.
|
||||
if ((!isset($data['posy'])) || (!is_numeric($data['posy'])) || ($data['posy'] < 0)) {
|
||||
$errors['posy'] = get_string('invalidposition', 'customcert', 'Y');
|
||||
}
|
||||
// Check if width is less than 0.
|
||||
if (isset($data['width']) && $data['width'] < 0) {
|
||||
$errors['width'] = get_string('invalidelementwidth', 'customcert');
|
||||
|
|
|
@ -64,16 +64,6 @@ class element extends \mod_customcert\element {
|
|||
$mform->setDefault('height', 0);
|
||||
$mform->addHelpButton('height', 'height', 'customcertelement_image');
|
||||
|
||||
$mform->addElement('text', 'posx', get_string('posx', 'customcert'), array('size' => 10));
|
||||
$mform->setType('posx', PARAM_INT);
|
||||
$mform->setDefault('posx', '0');
|
||||
$mform->addHelpButton('posx', 'posx', 'customcert');
|
||||
|
||||
$mform->addElement('text', 'posy', get_string('posy', 'customcert'), array('size' => 10));
|
||||
$mform->setType('posy', PARAM_INT);
|
||||
$mform->setDefault('posy', '0');
|
||||
$mform->addHelpButton('posy', 'posy', 'customcert');
|
||||
|
||||
$mform->addElement('filemanager', 'customcertimage', get_string('uploadimage', 'customcert'), '', $this->filemanageroptions);
|
||||
}
|
||||
|
||||
|
|
|
@ -93,10 +93,6 @@ $string['pluginadministration'] = 'Custom certificate administration';
|
|||
$string['pluginname'] = 'Custom certificate';
|
||||
$string['print'] = 'Print';
|
||||
$string['portrait'] = 'Portrait';
|
||||
$string['posx'] = 'Position X';
|
||||
$string['posx_help'] = 'This is the position in mm from the top left corner you wish the element\'s reference point to locate in the x direction.';
|
||||
$string['posy'] = 'Position Y';
|
||||
$string['posy_help'] = 'This is the position in mm from the top left corner you wish the element\'s reference point to locate in the y direction.';
|
||||
$string['rearrangeelements'] = 'Rearrange elements';
|
||||
$string['rearrangeelementsheading'] = 'Drag and drop elements to change where they are positioned on the certificate.';
|
||||
$string['receiveddate'] = 'Received date';
|
||||
|
|
Loading…
Reference in a new issue