Keep filter after saving patching

This commit is contained in:
Frank Schubert
2021-09-23 21:14:42 +02:00
parent ba1c96c3f5
commit 8a9e29087a
4 changed files with 65 additions and 10 deletions

View File

@@ -108,7 +108,7 @@
<tr class="table-bordered text-center">
<th colspan="4">Standort</th>
<th colspan="2">ODF</th>
<th colspan="4">Abschluss/Device</th>
<th colspan="5">Abschluss/Device</th>
<th></th>
</tr>
<tr class="table-bordered">
@@ -119,9 +119,10 @@
<th>Patchposition ODF</th>
<th>ODF Port</th>
<th>Typ</th>
<th>Gerät</th>
<th>Splitte / Gerät</th>
<th>Port</th>
<th>Gepatched</th>
<th>Von</th>
<th></th>
</tr>
<?php foreach($terminations as $term): ?>
@@ -156,11 +157,17 @@
<option value="switch" <?=($term->patching->device_type == "switch") ? "selected='selected'" : ""?>>Switch</option>
</select>
</td>
<td><input type="text" class="form-control" form="term-form-<?=$term->id?>" name="device_name" value="<?=$term->patching->device_name?>" placeholder="Gerät" /></td>
<td><input type="text" class="form-control" form="term-form-<?=$term->id?>" name="device_name" value="<?=$term->patching->device_name?>" placeholder="Splitte / Gerät" /></td>
<td><input type="text" class="form-control" form="term-form-<?=$term->id?>" name="device_port" value="<?=$term->patching->device_port?>" placeholder="Port" /></td>
<td><input type="checkbox" class="form-control" form="term-form-<?=$term->id?>" name="patched" value="1" <?=($term->patching->patched == 1) ? "checked='checked'" : ""?> /></td>
<td <?=($term->patching->patched == 1 && $term->patching->patched_by) ? "title='Gepatched: ".date("d.m.Y H:i",$term->patching->patched_date)." von ".$term->patching->patcher->name." (".$term->patching->patcher->address->getCompanyOrName(true).")'" : ""?>>
<?php if($term->patching->patched == 1 && $term->patching->patched_by): ?>
<?=($term->patching->patcher) ? $term->patching->patcher->getAbbrName() : ""?>
<?php endif; ?>
</td>
<td>
<form method="post" id="term-form-<?=$term->id?>" action="<?=self::getUrl("Patching","save")?>">
<form method="post" id="term-form-<?=$term->id?>" action="<?=self::getUrl("Patching","save", ["s" => $pagination['start'], "filter" => $filter])?>">
<input type="hidden" name="termination_id" value="<?=$term->id?>" />
<input type="submit" class="btn btn-primary" value="Speichern" />
</form>