Webgui improve filter functions
This commit is contained in:
1 parent
b3825cb1b3
commit
9d09b1e120
17 files changed
+435
-458
No files matched your search
+8
-39
@@ -220,47 +220,16 @@ $opt_special = array(
|
||||
// - selection for storage
|
||||
// - selection for box
|
||||
// page specific filter end
|
||||
|
||||
filter_create_select('flt_stor', _('Storage'), $g_opt_all + $g_opt_none + $opt_storage, $flt->stor);
|
||||
filter_create_select('flt_cond', _('Condition'), $g_opt_all + $opt_invcond, $flt->cond);
|
||||
filter_create_text('flt_text', _('Text'), $flt->txt, 15, 30);
|
||||
?>
|
||||
<div class="d-flex flex-nowrap gap-2">
|
||||
<label for="flt_stor"><?=_('Storage')?></label>
|
||||
<select class="form-select" id="flt_stor" name="flt_stor">
|
||||
<?php
|
||||
foreach ($opt_special + $opt_storage as $k => $v) {
|
||||
echo '<option value="', $k,'"';
|
||||
if ($k == $flt->stor) {
|
||||
echo ' selected';
|
||||
}
|
||||
echo '>', $v, '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="d-flex flex-nowrap gap-2">
|
||||
<label for="flt_cond"><?=_('Condition')?></label>
|
||||
<select class="form-select" id="flt_cond" name="flt_cond">
|
||||
<?php
|
||||
$opt_special = array(
|
||||
-2 => _('― all ―'),
|
||||
);
|
||||
foreach ($opt_special + $opt_invcond as $k => $v) {
|
||||
echo '<option value="', h($k), '"';
|
||||
if ($k == $flt->cond) {
|
||||
echo ' selected';
|
||||
}
|
||||
echo '>', $v, '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="d-flex flex-nowrap gap-2">
|
||||
<label for="flt_txt">Text</label>
|
||||
<input type="text" class="form-control" name="flt_txt" size="15" maxlength="30" value="<?=h($flt->txt)?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<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 class="card-footer">
|
||||
<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