Webgui: Add clear filter function
This commit is contained in:
+7
-1
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/******************************************************************************
|
||||
* YMS - Yacht Management Software
|
||||
* Copyright (C) 2024 Thomas Hooge
|
||||
* Copyright (C) 2024-2025 Thomas Hooge
|
||||
*
|
||||
* SPDX-License-Identifier: WTFPL
|
||||
******************************************************************************/
|
||||
@@ -29,6 +29,11 @@ switch ($submit = form_get_action()) {
|
||||
$action = ACT_DEFAULT;
|
||||
break;
|
||||
|
||||
case 'freset':
|
||||
db_clear_filter(210);
|
||||
$action = ACT_DEFAULT;
|
||||
break;
|
||||
|
||||
case 'insert':
|
||||
$p[':tagname'] = gpc_get_string($_POST, 'tagname');;
|
||||
$id = db_exec_insert('tag', $p);
|
||||
@@ -89,6 +94,7 @@ echo "<h1>$pagetitle</h1>\n";
|
||||
<label for="flt_txt">Text</label>
|
||||
<input type="text" name="flt_txt" size="15" maxlength="30" value="<?=$flt->txt ?? ''?>">
|
||||
<button name="submit[filter]" class="btn btn-sm btn-primary" title="<?=_('Apply')?>"><?=_('Go')?></button>
|
||||
<button name="submit[freset]" class="btn btn-sm btn-secondary float-end" title="<?=_('Reset filter to defaults')?>"><?=_('Clear')?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user