summaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2010-09-04 21:30:49 +0000
committerRobin Appelman <icewind1991@gmail.com>2010-09-04 22:46:20 +0000
commit37aa05abe53c317de841cd24a283a8629a3795f2 (patch)
treee811dc8be4cb9b4fa531f0cbecf95908006ed6ba /inc
parent6c53b7610c8912300bd94cf530c69806c5dd1b9b (diff)
downloadnextcloud-server-37aa05abe53c317de841cd24a283a8629a3795f2.tar.gz
nextcloud-server-37aa05abe53c317de841cd24a283a8629a3795f2.zip
remember the selected tab in the settings dialog when refreshing the page or submiting forms
Diffstat (limited to 'inc')
-rw-r--r--inc/templates/adminform.php6
-rw-r--r--inc/templates/settings.php11
2 files changed, 14 insertions, 3 deletions
diff --git a/inc/templates/adminform.php b/inc/templates/adminform.php
index 394df38da70..0a892d7d4bc 100644
--- a/inc/templates/adminform.php
+++ b/inc/templates/adminform.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?>
diff --git a/inc/templates/settings.php b/inc/templates/settings.php
index ef181164d04..9a1876f98a1 100644
--- a/inc/templates/settings.php
+++ b/inc/templates/settings.php
@@ -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