Merge branch 'wip-mdl-38851' of git://github.com/rajeshtaneja/moodle

This commit is contained in:
Damyon Wiese 2013-04-24 11:39:13 +08:00
commit c65bf47276
7 changed files with 159 additions and 60 deletions

7
cache/forms.php vendored
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>');
}