MDL-38851 Admin: Fixed setType notice for cache

This commit is contained in:
Rajesh Taneja
2013-04-24 11:18:30 +08:00
parent ac31413e95
commit 81dd294f06
+4 -3
View File
@@ -57,19 +57,20 @@ class cachestore_addinstance_form extends moodleform {
$form->addElement('text', 'name', get_string('storename', 'cache'));
$form->addHelpButton('name', 'storename', 'cache');
$form->addRule('name', get_string('required'), 'required');
$form->setType('name', PARAM_TEXT);
$form->setType('name', PARAM_NOTAGS);
} else {
$form->addElement('hidden', 'name', $store);
$form->addElement('static', 'name-value', get_string('storename', 'cache'), $store);
$form->setType('name', PARAM_TEXT);
$form->setType('name', PARAM_NOTAGS);
}
if (is_array($locks)) {
$form->addElement('select', 'lock', get_string('lockmethod', 'cache'), $locks);
$form->addHelpButton('lock', 'lockmethod', 'cache');
$form->setType('lock', PARAM_TEXT);
$form->setType('lock', PARAM_PLUGIN);
} else {
$form->addElement('hidden', 'lock', '');
$form->setType('lock', PARAM_PLUGIN);
$form->addElement('static', 'lock-value', get_string('lockmethod', 'cache'),
'<em>'.get_string('nativelocking', 'cache').'</em>');
}