Filter is kept after saving workflow
This commit is contained in:
@@ -110,8 +110,8 @@
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<form method="post" name="wf-building-<?=$building->id?>" id="wf-building-<?=$building->id?>" action="<?=self::getUrl("Pipework","save")?>" enctype="multipart/form-data" >
|
||||
<input type="hidden" name="id" value="<?=$building->id?>" />
|
||||
<form method="post" name="wf-building-<?=$building->id?>" id="wf-building-<?=$building->id?>" action="<?=self::getUrl("Pipework","save", ["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): ?>
|
||||
<?php if($i==0): ?>
|
||||
@@ -211,4 +211,4 @@ $(document).ready(function() {
|
||||
</script>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
|
||||
@@ -196,11 +196,11 @@ class PipeworkController extends mfBaseController {
|
||||
if(defined("TT_WORKFLOW_ITEM_STATUS_FIELD") && defined("TT_WORKFLOW_ITEM_STATUS_VALUE_PASSED") && defined("TT_WORKFLOW_ITEM_STATUS_VALUE_CONNECTED")) {
|
||||
$status_value = $building->workflowitems[TT_WORKFLOW_ITEM_STATUS_FIELD]->value->value_string;
|
||||
//var_dump($status_value);exit;
|
||||
if($status_value == TT_WORKFLOW_ITEM_STATUS_VALUE_PASSED) {
|
||||
if($status_value == TT_WORKFLOW_ITEM_STATUS_VALUE_PASSED && $building->status_id != 4) {
|
||||
$building->status_id = 4;
|
||||
$building->save();
|
||||
}
|
||||
if($status_value == TT_WORKFLOW_ITEM_STATUS_VALUE_CONNECTED) {
|
||||
if($status_value == TT_WORKFLOW_ITEM_STATUS_VALUE_CONNECTED && $building->status_id != 5) {
|
||||
$building->status_id = 5;
|
||||
$building->save();
|
||||
}
|
||||
@@ -250,11 +250,11 @@ class PipeworkController extends mfBaseController {
|
||||
}
|
||||
|
||||
$this->layout->setFlash("Workflow Eintrag erfolgreich gespeichert.", "success");
|
||||
$this->redirect("Pipework","Index", false, "object=".$building_id);
|
||||
$this->redirect("Pipework","Index", http_build_query(["filter" => $this->request->filter]), "object=".$building_id);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,22 +207,27 @@ class mfBaseController {
|
||||
}
|
||||
}*/
|
||||
|
||||
if(is_array($params) && count($params)) {
|
||||
$url .= (MFUSEFANCYURLS) ? "/?" : "&";
|
||||
foreach($params as $k => $v) {
|
||||
$v = urlencode($v);
|
||||
|
||||
if($k) {
|
||||
$k = urlencode($k);
|
||||
$url .= "$k=$v&";
|
||||
} else {
|
||||
$url .= "$v&";
|
||||
}
|
||||
}
|
||||
|
||||
$url = preg_replace('/&$/', '', $url);
|
||||
if($params) {
|
||||
|
||||
if(is_array($params) && count($params)) {
|
||||
$url .= (MFUSEFANCYURLS) ? "/?" : "&";
|
||||
foreach($params as $k => $v) {
|
||||
$v = urlencode($v);
|
||||
|
||||
if($k) {
|
||||
$k = urlencode($k);
|
||||
$url .= "$k=$v&";
|
||||
} else {
|
||||
$url .= "$v&";
|
||||
}
|
||||
}
|
||||
|
||||
$url = preg_replace('/&$/', '', $url);
|
||||
} else {
|
||||
$url .= (MFUSEFANCYURLS) ? "/?" : "&";
|
||||
$url .= $params;
|
||||
}
|
||||
}
|
||||
|
||||
if($anker) {
|
||||
$url.="#$anker";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user