moving to roles again after saving

This commit is contained in:
Frank Schubert
2021-07-02 00:10:55 +02:00
parent f66da99910
commit 5c99e8008e
4 changed files with 22 additions and 5 deletions

View File

@@ -241,6 +241,22 @@
}
}
var network;
var hash = window.location.hash.substr(1);
var match = hash.match(/net=(\d+)/);
if(match && match[1]) {
network = match[1]
toggleNetwork(network);
}
match = hash.match(/view=([^&]+)/);
if(match && match[1] == "roles" && network) {
$('a[href="#net-detail-' + network + '-roles"]').tab('show');
}
//window.location.hash = "";
</script>
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>

View File

@@ -21,6 +21,7 @@
<script type="text/javascript" src="<?=self::getResourcePath()?>js/jquery.min.js"></script>
<script type="text/javascript" src="<?=self::getResourcePath()?>assets/libs/select2/select2.min.js"></script>
<script type="text/javascript" src="<?=self::getResourcePath()?>js/bootstrap.min.js"></script>

View File

@@ -59,7 +59,7 @@ class NetworkAddressController extends mfBaseController {
}
}
$this->redirect("Network");
$this->redirect("Network", "Index", [],"view=roles&net=$network_id");
}
protected function createAction() {
@@ -98,6 +98,6 @@ class NetworkAddressController extends mfBaseController {
$na->save();
}
$this->redirect("Network");
$this->redirect("Network", "Index", [],"view=roles&net=$network_id");
}
}

File diff suppressed because one or more lines are too long