mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'wip-mdl-38851' of git://github.com/rajeshtaneja/moodle
This commit is contained in:
commit
c65bf47276
7 changed files with 159 additions and 60 deletions
7
cache/forms.php
vendored
7
cache/forms.php
vendored
|
@ -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>');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue