Filter persists after save

This commit is contained in:
Frank Schubert
2021-11-02 20:24:23 +01:00
parent 6b8150b214
commit e2925adec5
2 changed files with 15 additions and 2 deletions

View File

@@ -203,7 +203,7 @@
<tr class="<?=($prov_count % 2 == 0) ? "table-bg-even" : "table-bg-odd"?> bottom-no-border">
<td colspan="6">
<form method="post" id="cpeprovform-<?=$product->id?>" action="<?=self::getUrl("Cpeprovisioning", "Save")?>">
<form method="post" id="cpeprovform-<?=$product->id?>" action="<?=self::getUrl("Cpeprovisioning", "Save", ["filter" => $filter])?>">
<input type="hidden" name="id" value="<?=$product->cpeprovisioning->id?>" />
<input type="hidden" name="order_id" value="<?=$product->order_id?>" />
<input type="hidden" name="orderproduct_id" value="<?=$product->id?>" />

View File

@@ -207,8 +207,21 @@ class CpeprovisioningController extends mfBaseController {
}
}
$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("Eintrag erfolgreich gespeichert.", "success");
$this->redirect("Cpeprovisioning");
$this->redirect("Cpeprovisioning","Index", $qs);
}