Browse files

MDL-39066 blogs: Add missing setType calls in blogs

  • Loading branch information...
1 parent b3661ab commit a915104b4d615412a97b83bb2ca94fc139f11080 @ankitagarwal ankitagarwal committed Apr 15, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 blog/external_blog_edit_form.php
View
6 blog/external_blog_edit_form.php
@@ -37,20 +37,24 @@ public function definition() {
$mform =& $this->_form;
- $mform->addElement('text', 'url', get_string('url', 'blog'), array('size' => 50));
+ $mform->addElement('url', 'url', get_string('url', 'blog'), array('size' => 50));
+ $mform->setType('url', PARAM_URL);
$mform->addRule('url', get_string('emptyurl', 'blog'), 'required', null, 'client');
$mform->addHelpButton('url', 'url', 'blog');
$mform->addElement('text', 'name', get_string('name', 'blog'));
+ $mform->setType('name', PARAM_TEXT);
$mform->addHelpButton('name', 'name', 'blog');
$mform->addElement('textarea', 'description', get_string('description', 'blog'), array('cols' => 50, 'rows' => 7));
$mform->addHelpButton('description', 'description', 'blog');
if (!empty($CFG->usetags)) {
$mform->addElement('text', 'filtertags', get_string('filtertags', 'blog'), array('size' => 50));
+ $mform->setType('filtertags', PARAM_TAGLIST);
$mform->addHelpButton('filtertags', 'filtertags', 'blog');
$mform->addElement('text', 'autotags', get_string('autotags', 'blog'), array('size' => 50));
+ $mform->setType('autotags', PARAM_TAGLIST);
$mform->addHelpButton('autotags', 'autotags', 'blog');
}

0 comments on commit a915104

Please sign in to comment.