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
@@ -39,6 +39,11 @@ switch ($submit = form_get_action()) {
$action = ACT_DEFAULT;
break;
case 'freset':
db_clear_filter(200);
$action = ACT_DEFAULT;
break;
case 'insert':
$p[':vid'] = $user->vid;
$p[':ename'] = gpc_get_string($_POST, 'ename');
@@ -265,6 +270,7 @@ filter_create_select('flt_supp', _('Supplier'), $g_opt_all + $opt_none_male + $o
<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>