MDL-56297 forms: Normalize uses of 'url' fields to use size=60

While this is not related to this issue, when reviewing it was
detected that the size of those url fields was really small and
looking decided to add this bit of normalization over existing uses.
This commit is contained in:
Eloy Lafuente (stronk7) 2016-10-31 19:42:38 +01:00
parent 7aa17ce256
commit 5165c9f460
2 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ class user_evidence extends persistent {
$mform->addElement('editor', 'description', get_string('userevidencedescription', 'tool_lp'), array('rows' => 10));
$mform->setType('description', PARAM_RAW);
$mform->addElement('url', 'url', get_string('userevidenceurl', 'tool_lp'), array(), array('usefilepicker' => false));
$mform->addElement('url', 'url', get_string('userevidenceurl', 'tool_lp'), array('size' => '60'), array('usefilepicker' => false));
$mform->setType('url', PARAM_RAW_TRIMMED); // Can not use PARAM_URL, it silently converts bad URLs to ''.
$mform->addHelpButton('url', 'userevidenceurl', 'tool_lp');

View File

@ -36,7 +36,7 @@ class blog_edit_external_form extends moodleform {
$mform =& $this->_form;
$mform->addElement('url', 'url', get_string('url', 'blog'), array('size' => 50), array('usefilepicker' => false));
$mform->addElement('url', 'url', get_string('url', 'blog'), array('size' => 60), array('usefilepicker' => false));
$mform->setType('url', PARAM_URL);
$mform->addRule('url', get_string('emptyurl', 'blog'), 'required', null, 'client');
$mform->addHelpButton('url', 'url', 'blog');