Commit 66dd9e40 authored by Melissa Draper's avatar Melissa Draper
Browse files

Alter view theme dropdown to enable no theme selection



Bug #731064

Change-Id: Icedb749c3c5495685f341bc22fb5854a03bca606
Signed-off-by: default avatarMelissa Draper <melissa@catalyst.net.nz>
parent 25978130
......@@ -595,6 +595,7 @@ function get_user_accessible_themes() {
}
}
$themes = array_merge(array('sitedefault' => '- ' . get_string('sitedefault', 'admin') . ' (' . $themes[get_config('theme')] . ') -'), $themes);
return $themes;
}
......
......@@ -1799,6 +1799,9 @@ class View {
if ($theme = $values['theme']) {
$themes = get_user_accessible_themes();
if (isset($themes[$theme])) {
if($theme == 'sitedefault') {
$theme = null;
}
$this->set('theme', $theme);
$this->commit();
}
......
......@@ -33,7 +33,6 @@
<div id="middle-pane" class="center">
<label for="viewtheme-select">{str tag=theme}: </label>
<select id="viewtheme-select" name="viewtheme">
<option value="">{str tag=choosetheme}</option>
{foreach from=$viewthemes key=themeid item=themename}
<option value="{$themeid}"{if $themeid == $viewtheme} selected="selected" style="font-weight: bold;"{/if}>{$themename}</option>
{/foreach}
......
......@@ -8,7 +8,6 @@
<input type="hidden" name="sesskey" value="{$SESSKEY}">
<label for="viewtheme-select">{str tag=theme}: </label>
<select id="viewtheme-select" name="viewtheme">
<option value="">{str tag=choosetheme}</option>
{foreach from=$viewthemes key=themeid item=themename}
<option value="{$themeid}"{if $themeid == $viewtheme} selected="selected" style="font-weight: bold;"{/if}>{$themename}</option>
{/foreach}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment