remember the selected tab in the settings dialog when refreshing the page or submiting forms

remotes/origin/stable
Robin Appelman 15 years ago
parent 6c53b7610c
commit 37aa05abe5
  1. 6
      inc/templates/adminform.php
  2. 11
      inc/templates/settings.php

@ -53,11 +53,11 @@ function dbtypechange(){
</script>
<?php
if(!$FIRSTRUN){
$action=$WEBROOT.'/settings';
$action=$WEBROOT.'/settings/#system_settings';
}else{
$action='#';
}
echo('<form method="post" enctype="multipart/form-data" action="'.$action.'">')
echo('<form method="post" action="'.$action.'">')
?>
<table cellpadding="5" cellspacing="5" border="0" class="loginform">
<?php
@ -134,7 +134,7 @@ if($CONFIG_DBTYPE=='sqlite'){
<tr id='dbAdminPwd'><td>database administrative password:</td><td><input type="password" name="dbadminpwd" size="30" class="formstyle" value=''></input></td></tr>
<tr id='dbfill'><td>automaticly fill initial database:</td><td><input type="checkbox" name="filldb" size="30" class="formstyle" value='1' <?php if($FIRSTRUN) echo 'checked="checked"'; ?>></input></td></tr>
<?php }?>
<tr><td></td><td><input type="submit" name="set_config" alt="save" value="save" class="formstyle" /></td></tr>
<tr><td></td><td><input type="submit" name='set_config' alt="save" value="save" class="formstyle" /></td></tr>
</table></form><br/>
<?php
if(!$FIRSTRUN ){//disabled for now?>

@ -5,6 +5,14 @@ function showForm(id){
form.setAttribute('class','settingsContent');
}
function showFormInit(){
var loc=document.location.toString();
if(loc.indexOf('#')!=-1){
var id=loc.substring(loc.indexOf('#')+1);
showForm(id);
}
}
function hideAllForms(){
forms=document.getElementById('settingsHolder').childNodes;
for(var i=0;i<forms.length;i++){
@ -36,3 +44,6 @@ foreach(OC_CONFIG::$forms as $name=>$url){
}
?>
</div>
<script type="text/javascript">
OC_onload.add(showFormInit());
</script>
Loading…
Cancel
Save