MDL-21137 MNet: UI to choose peer theme replaced with simple selector

There is no need to have whole featured theme selector with previews
etc here. Following the same form element as they have in Mahara, the
theme can now be selected for a given peer at 'Review host details' tab.
I have also noticed that force_theme and theme columns are redundant at
the moment. Keeping them both for future improvements, though.
This commit is contained in:
David Mudrak 2010-07-12 15:03:42 +00:00
parent d55b0e6a1e
commit 7c70229eba
6 changed files with 15 additions and 202 deletions

View file

@ -86,6 +86,13 @@ class mnet_review_host_form extends moodleform {
$mform->addElement('text', 'wwwroot', get_string('hostname', 'mnet'));
$mform->setType('wwwroot', PARAM_URL);
$themes = array('' => get_string('forceno'));
foreach (array_keys(get_plugin_list('theme')) as $themename) {
$themes[$themename] = get_string('pluginname', 'theme_'.$themename);
}
$mform->addElement('select', 'theme', get_string('forcetheme'), $themes);
$mform->addElement('textarea', 'public_key', get_string('publickey', 'mnet'), array('rows' => 17, 'cols' => 100, 'class' => 'smalltext'));
$mform->setType('public_key', PARAM_PEM);