Skip to content
Snippets Groups Projects
Commit 37aa05ab authored by Robin Appelman's avatar Robin Appelman
Browse files

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

parent 6c53b761
No related branches found
No related tags found
No related merge requests found
......@@ -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>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment