Fixed redirect to saved object after Workflow Save
This commit is contained in:
@@ -170,7 +170,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<form method="post" name="wf-termination-<?=$term->id?>" id="wf-termination-<?=$term->id?>" action="<?=self::getUrl("Linework","save", ["filter" => $filter])?>" enctype="multipart/form-data" >
|
||||
<form method="post" name="wf-termination-<?=$term->id?>" id="wf-termination-<?=$term->id?>" action="<?=self::getUrl("Linework","save", ["filter" => $filter, "s" => $pagination['start']])?>" enctype="multipart/form-data" >
|
||||
<input type="hidden" name="id" value="<?=$term->id?>" />
|
||||
<table class="table workflow-table">
|
||||
<?php $i = 0; foreach($term->workflowitems as $item): ?>
|
||||
@@ -297,8 +297,8 @@ $(document).ready(function() {
|
||||
var hash = window.location.hash.substr(1);
|
||||
var match = hash.match(/object=(\d+)/);
|
||||
if(match && match[1]) {
|
||||
building = match[1]
|
||||
var pos = $('#object-' + term).offset().top;
|
||||
term = match[1]
|
||||
var pos = $('#termination-' + term).offset().top;
|
||||
$(window).scrollTop(pos - 150 );
|
||||
}
|
||||
});
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<form method="post" name="wf-building-<?=$building->id?>" id="wf-building-<?=$building->id?>" action="<?=self::getUrl("Pipework","save", ["filter" => $filter])?>" enctype="multipart/form-data" >
|
||||
<form method="post" name="wf-building-<?=$building->id?>" id="wf-building-<?=$building->id?>" action="<?=self::getUrl("Pipework","save", ["s" => $pagination['start'], "filter" => $filter])?>" enctype="multipart/form-data" >
|
||||
<input type="hidden" name="id" value="<?=$building->id?>" />
|
||||
<table class="table workflow-table">
|
||||
<?php $i = 0; foreach($building->workflowitems as $item): ?>
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner","lineplanner"])): ?><li><a href="<?=self::getUrl("Building")?>">Objekte & Anschlüsse</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner","pipeworker"])): ?><li><a href="<?=self::getUrl("Pipework")?>">Tiefbau</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner","pipeworker","lineplanner","lineworker"])): ?><li><a href="<?=self::getUrl("Linework")?>">Leitungsbau</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner","pipeworker","lineplanner","lineworker"])): ?><li><a href="<?=self::getUrl("Pipework")?>">Tiefbau</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","lineplanner","lineworker"])): ?><li><a href="<?=self::getUrl("Linework")?>">Leitungsbau</a></li><?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -306,8 +306,19 @@ class LineworkController extends mfBaseController {
|
||||
|
||||
}
|
||||
|
||||
$sq = "";
|
||||
$query = [];
|
||||
if(is_numeric($this->request->s) && $this->request->s > 0) {
|
||||
$query["s"] = $this->request->s;
|
||||
}
|
||||
if (is_array($this->request->filter)) {
|
||||
$query["filter"] = $this->request->filter;
|
||||
}
|
||||
|
||||
$qs = http_build_query($query);
|
||||
|
||||
$this->layout->setFlash("Workflow Eintrag erfolgreich gespeichert.", "success");
|
||||
$this->redirect("Linework","Index", http_build_query(["filter" => $this->request->filter]), "object=".$termination_id);
|
||||
$this->redirect("Linework","Index", $qs, "object=".$termination_id);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -302,8 +302,19 @@ class PipeworkController extends mfBaseController {
|
||||
|
||||
}
|
||||
|
||||
$sq = "";
|
||||
$query = [];
|
||||
if(is_numeric($this->request->s) && $this->request->s > 0) {
|
||||
$query["s"] = $this->request->s;
|
||||
}
|
||||
if (is_array($this->request->filter)) {
|
||||
$query["filter"] = $this->request->filter;
|
||||
}
|
||||
|
||||
$qs = http_build_query($query);
|
||||
|
||||
$this->layout->setFlash("Workflow Eintrag erfolgreich gespeichert.", "success");
|
||||
$this->redirect("Pipework","Index", http_build_query(["filter" => $this->request->filter]), "object=".$building_id);
|
||||
$this->redirect("Pipework","Index", $qs, "object=".$building_id);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user