Webgui: Add clear filter function

This commit is contained in:
2025-11-08 08:05:10 +01:00
parent a3793df629
commit e99a053594
8 changed files with 85 additions and 4 deletions
+6
View File
@@ -34,6 +34,11 @@ switch ($submit = form_get_action()) {
$action = ACT_DEFAULT;
break;
case 'freset':
db_clear_filter(202);
$action = ACT_DEFAULT;
break;
case 'insert':
$p[':provname'] = gpc_get_string($_POST, 'provname');
$p[':number'] = gpc_get_int($_POST, 'number');
@@ -118,6 +123,7 @@ filter_create_select('flt_cat', _('Category'), $g_opt_all + $g_opt_none + $opt_c
<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>