specify default search-field for on-page listing-search/filter
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -230,6 +230,7 @@ class Listing
|
|||||||
'label' => $coldata['label'],
|
'label' => $coldata['label'],
|
||||||
'checked' => in_array($column, $tabellisting['visible_columns']),
|
'checked' => in_array($column, $tabellisting['visible_columns']),
|
||||||
'searchable' => $coldata['searchable'] ?? true,
|
'searchable' => $coldata['searchable'] ?? true,
|
||||||
|
'isdefaultsearchfield' => $coldata['isdefaultsearchfield'] ?? false,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ return [
|
|||||||
'field' => 'loginname',
|
'field' => 'loginname',
|
||||||
'callback' => [Impersonate::class, 'admin'],
|
'callback' => [Impersonate::class, 'admin'],
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
|
'isdefaultsearchfield' => true,
|
||||||
],
|
],
|
||||||
'name' => [
|
'name' => [
|
||||||
'label' => lng('customer.name'),
|
'label' => lng('customer.name'),
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ return [
|
|||||||
'd.domain_ace' => [
|
'd.domain_ace' => [
|
||||||
'label' => lng('domains.domainname'),
|
'label' => lng('domains.domainname'),
|
||||||
'field' => 'domain_ace',
|
'field' => 'domain_ace',
|
||||||
|
'isdefaultsearchfield' => true,
|
||||||
],
|
],
|
||||||
'ipsandports' => [
|
'ipsandports' => [
|
||||||
'label' => lng('admin.ipsandports.ipsandports'),
|
'label' => lng('admin.ipsandports.ipsandports'),
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ return [
|
|||||||
'description' => [
|
'description' => [
|
||||||
'label' => lng('admin.phpsettings.description'),
|
'label' => lng('admin.phpsettings.description'),
|
||||||
'field' => 'description',
|
'field' => 'description',
|
||||||
|
'isdefaultsearchfield' => true,
|
||||||
],
|
],
|
||||||
'configs' => [
|
'configs' => [
|
||||||
'label' => lng('admin.phpsettings.activephpconfigs'),
|
'label' => lng('admin.phpsettings.activephpconfigs'),
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ return [
|
|||||||
'ip' => [
|
'ip' => [
|
||||||
'label' => lng('admin.ipsandports.ip'),
|
'label' => lng('admin.ipsandports.ip'),
|
||||||
'field' => 'ip',
|
'field' => 'ip',
|
||||||
|
'isdefaultsearchfield' => true,
|
||||||
],
|
],
|
||||||
'port' => [
|
'port' => [
|
||||||
'label' => lng('admin.ipsandports.port'),
|
'label' => lng('admin.ipsandports.port'),
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ return [
|
|||||||
'caption' => [
|
'caption' => [
|
||||||
'label' => lng('admin.mysqlserver.caption'),
|
'label' => lng('admin.mysqlserver.caption'),
|
||||||
'field' => 'caption',
|
'field' => 'caption',
|
||||||
|
'isdefaultsearchfield' => true,
|
||||||
],
|
],
|
||||||
'host' => [
|
'host' => [
|
||||||
'label' => lng('admin.mysqlserver.host'),
|
'label' => lng('admin.mysqlserver.host'),
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ return [
|
|||||||
'c.description' => [
|
'c.description' => [
|
||||||
'label' => lng('admin.phpsettings.description'),
|
'label' => lng('admin.phpsettings.description'),
|
||||||
'field' => 'description',
|
'field' => 'description',
|
||||||
|
'isdefaultsearchfield' => true,
|
||||||
],
|
],
|
||||||
'domains' => [
|
'domains' => [
|
||||||
'label' => lng('admin.phpsettings.activedomains'),
|
'label' => lng('admin.phpsettings.activedomains'),
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ return [
|
|||||||
'p.name' => [
|
'p.name' => [
|
||||||
'label' => lng('admin.plans.name'),
|
'label' => lng('admin.plans.name'),
|
||||||
'field' => 'name',
|
'field' => 'name',
|
||||||
|
'isdefaultsearchfield' => true,
|
||||||
],
|
],
|
||||||
'p.description' => [
|
'p.description' => [
|
||||||
'label' => lng('admin.plans.description'),
|
'label' => lng('admin.plans.description'),
|
||||||
|
|||||||
@@ -111,7 +111,7 @@
|
|||||||
<select class="form-select" name="searchfield" id="searchfield">
|
<select class="form-select" name="searchfield" id="searchfield">
|
||||||
{% for key, column in listing.available_columns %}
|
{% for key, column in listing.available_columns %}
|
||||||
{% if column.searchable is not defined or (column.searchable is defined and column.searchable == true) %}
|
{% if column.searchable is not defined or (column.searchable is defined and column.searchable == true) %}
|
||||||
<option value="{{ key }}">{{ column.label }}</option>
|
<option value="{{ key }}" {% if column.isdefaultsearchfield is defined and column.isdefaultsearchfield == true %}selected{% endif %}>{{ column.label }}</option>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Reference in New Issue
Block a user