Commit ed32bea1 authored by Jyhem's avatar Jyhem

[ENH] tab preference in admin_features is now maintained over session

parent 256e5051
......@@ -7,6 +7,7 @@
<div class="heading input_submit_container" style="text-align: right">
{if $prefs.feature_tabs eq 'y'}
{tr}No tabs{/tr}
<input type="hidden" name="feature_tabs" value="active" />
<input type="checkbox" name="tabs"{if $tabs eq 'n'} checked="checked"{/if} onclick="document.features.submit();"/>
{/if}
<input type="submit" name="features" value="{tr}Apply{/tr}" />
......
......@@ -126,10 +126,13 @@ if (isset($_REQUEST["features"])) {
}
if (!empty($_REQUEST['tabs'])) {
$smarty->assign('tabs', $_REQUEST['tabs']=='on'?'n':'');
$_SESSION["tabbed_admin_features"] = $_REQUEST['tabs']=='on'?'n':'' ;
} else {
$smarty->assign('tabs', '');
if( $_REQUEST["feature_tabs"] ) { // Verifies that form was submitted
$_SESSION["tabbed_admin_features"] = '' ;
}
}
$smarty->assign('tabs', $_SESSION["tabbed_admin_features"]);
$smarty->assign('php_major_version', substr(PHP_VERSION, 0, strpos(PHP_VERSION, '.')));
......
Markdown is supported
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