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
|
||||
******************************************************************************/
|
||||
@@ -31,6 +31,11 @@ switch ($submit = form_get_action()) {
|
||||
$action = ACT_DEFAULT;
|
||||
break;
|
||||
|
||||
case 'freset':
|
||||
db_clear_filter(208);
|
||||
$action = ACT_DEFAULT;
|
||||
break;
|
||||
|
||||
case 'insert':
|
||||
$p[':compname'] = gpc_get_string($_POST, 'compname');
|
||||
$p[':comptype'] = gpc_get_int($_POST, 'comptype');
|
||||
@@ -168,6 +173,7 @@ foreach ($opt_special + $opt_comptype as $k => $v) {
|
||||
<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