$mform->addElement('text', 'apikey', get_string('apikey', 'portfolio_boxnet'));
$mform->addRule('apikey', get_string('required'), 'required', null, 'client');
+ $mform->setType('apikey', PARAM_RAW_TRIMMED);
$a = new stdClass();
$a->servicesurl = 'http://www.box.net/developers/services';
$a->callbackurl = $CFG->wwwroot . '/portfolio/add.php?postcontrol=1&type=boxnet';
$strrequired = get_string('required');
$mform->addElement('text', 'apikey', get_string('apikey', 'portfolio_flickr'), array('size' => 30));
$mform->addRule('apikey', $strrequired, 'required', null, 'client');
+ $mform->setType('apikey', PARAM_RAW_TRIMMED);
$mform->addElement('text', 'sharedsecret', get_string('sharedsecret', 'portfolio_flickr'));
$mform->addRule('sharedsecret', $strrequired, 'required', null, 'client');
+ $mform->setType('sharedsecret', PARAM_RAW_TRIMMED);
$a = new stdClass();
$a->applyurl = 'http://www.flickr.com/services/api/keys/apply/';
$a->keysurl = 'http://www.flickr.com/services/api/keys/';
}
$mform->addElement('select', 'mnethostid', get_string('mnethost', 'portfolio_mahara'), $hosts);
$mform->addRule('mnethostid', $strrequired, 'required', null, 'client');
+ $mform->setType('mnethostid', PARAM_INT);
$mform->addElement('selectyesno', 'enableleap2a', get_string('enableleap2a', 'portfolio_mahara'));
+ $mform->setType('enableleap2a', PARAM_BOOL);
}
public function instance_sanity_check() {