Skip to content

Commit

Permalink
Change to form.
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Mar 11, 2016
1 parent b0cac4b commit bb2edde
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions block_theme_selector.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,16 @@ public function get_content() {
unset($options['bootstrapbase']);
$current = $this->page->theme->name;
}
$this->content->text .= html_writer::start_tag('div', array('class' => 'themeselectorselect'));
$this->content->text .= html_writer::start_tag('form', array('class' => 'themeselectorselect'));
$this->content->text .= html_writer::tag('label', get_string('changetheme', 'block_theme_selector'),
array('id' => 'themeselectorselectlabel'));
$this->content->text .= html_writer::select($options, 'choose', $current, false, $selectdataarray);
$this->content->text .= html_writer::end_tag('div');
$this->content->text .= html_writer::end_tag('form');

if (has_capability('moodle/site:config', $coursecontext)) {
// Add a button to reset theme caches.
$this->content->text .= html_writer::start_tag('div', array('class' => 'themeselectorreset'));
$this->content->text .= html_writer::start_tag('form', array('action' => new moodle_url('/theme/index.php'),
'method' => 'post'));
'method' => 'post', 'class' => 'themeselectorreset'));
$this->content->text .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'sesskey',
'value' => sesskey()));
$this->content->text .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'reset',
Expand All @@ -100,7 +99,6 @@ public function get_content() {
$this->content->text .= html_writer::tag('button', get_string('resetthemecache', 'block_theme_selector'),
array('type' => 'submit'));
$this->content->text .= html_writer::end_tag('form');
$this->content->text .= html_writer::end_tag('div');
}

$this->content->text .= '<br />';
Expand Down

0 comments on commit bb2edde

Please sign in to comment.