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