Skip to content

Commit

Permalink
MDL-27862 Themes: replaced disabled use theme button with unset theme…
Browse files Browse the repository at this point in the history
… button
  • Loading branch information
Rajesh Taneja committed Mar 12, 2012
1 parent 2942426 commit c6a49f7
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions theme/index.php
Expand Up @@ -192,10 +192,19 @@
// Contents of the second cell. // Contents of the second cell.
$infocell = $OUTPUT->heading($strthemename, 3); $infocell = $OUTPUT->heading($strthemename, 3);


// Button to choose this as the main theme // Button to choose this as the main theme or unset this theme for
$maintheme = new single_button(new moodle_url('/theme/index.php', array('device' => $device, 'choose' => $themename, 'sesskey' => sesskey())), get_string('usetheme'), 'get'); // devices other then default
$maintheme->disabled = $ischosentheme; if (($ischosentheme) && ($device != 'default')) {
$infocell .= $OUTPUT->render($maintheme); $unsetthemestr = get_string('unsettheme', 'admin');
$unsetthemeurl = new moodle_url('/theme/index.php', array('device' => $device, 'unsettheme' => true, 'sesskey' => sesskey()));
$unsetbutton = new single_button($unsetthemeurl, $unsetthemestr, 'get');
$infocell .= $OUTPUT->render($unsetbutton);
} else if ((!$ischosentheme)) {
$setthemestr = get_string('usetheme');
$setthemeurl = new moodle_url('/theme/index.php', array('device' => $device, 'choose' => $themename, 'sesskey' => sesskey()));
$setthemebutton = new single_button($setthemeurl, $setthemestr, 'get');
$infocell .= $OUTPUT->render($setthemebutton);
}


$row[] = $infocell; $row[] = $infocell;


Expand Down

0 comments on commit c6a49f7

Please sign in to comment.