mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Replicate 'max length' field in PrefixFilterForm for consistency
This commit is contained in:
@ -437,6 +437,9 @@ class PrefixFilterForm(BootstrapMixin, TenancyFilterForm, CustomFieldFilterForm)
|
|||||||
'q', 'within_include', 'family', 'mask_length', 'vrf_id', 'status', 'region', 'site', 'role', 'tenant_group',
|
'q', 'within_include', 'family', 'mask_length', 'vrf_id', 'status', 'region', 'site', 'role', 'tenant_group',
|
||||||
'tenant', 'is_pool', 'expand',
|
'tenant', 'is_pool', 'expand',
|
||||||
]
|
]
|
||||||
|
mask_length__lte = forms.IntegerField(
|
||||||
|
widget=forms.HiddenInput()
|
||||||
|
)
|
||||||
q = forms.CharField(
|
q = forms.CharField(
|
||||||
required=False,
|
required=False,
|
||||||
label='Search'
|
label='Search'
|
||||||
|
@ -7,33 +7,36 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<form action="." method="get" class="form">
|
<form action="." method="get" class="form">
|
||||||
{% for field in filter_form %}
|
{% for field in filter_form.hidden_fields %}
|
||||||
<div class="form-group">
|
{{ field }}
|
||||||
{% if field.name == "q" %}
|
{% endfor %}
|
||||||
<div class="input-group">
|
{% for field in filter_form.visible_fields %}
|
||||||
<input type="text" name="q" class="form-control" placeholder="Search" {% if request.GET.q %}value="{{ request.GET.q }}" {% endif %}/>
|
<div class="form-group">
|
||||||
<span class="input-group-btn">
|
{% if field.name == "q" %}
|
||||||
<button type="submit" class="btn btn-primary">
|
<div class="input-group">
|
||||||
<span class="fa fa-search" aria-hidden="true"></span>
|
<input type="text" name="q" class="form-control" placeholder="Search" {% if request.GET.q %}value="{{ request.GET.q }}" {% endif %}/>
|
||||||
</button>
|
<span class="input-group-btn">
|
||||||
</span>
|
<button type="submit" class="btn btn-primary">
|
||||||
</div>
|
<span class="fa fa-search" aria-hidden="true"></span>
|
||||||
{% elif field|widget_type == 'checkboxinput' %}
|
</button>
|
||||||
<label for="{{ field.id_for_label }}">{{ field }} {{ field.label }}</label>
|
</span>
|
||||||
{% else %}
|
</div>
|
||||||
{{ field.label_tag }}
|
{% elif field|widget_type == 'checkboxinput' %}
|
||||||
{{ field }}
|
<label for="{{ field.id_for_label }}">{{ field }} {{ field.label }}</label>
|
||||||
{% endif %}
|
{% else %}
|
||||||
</div>
|
{{ field.label_tag }}
|
||||||
{% endfor %}
|
{{ field }}
|
||||||
<div class="text-right noprint">
|
{% endif %}
|
||||||
<button type="submit" class="btn btn-primary">
|
|
||||||
<span class="fa fa-search" aria-hidden="true"></span> Apply
|
|
||||||
</button>
|
|
||||||
<a href="." class="btn btn-default">
|
|
||||||
<span class="fa fa-remove" aria-hidden="true"></span> Clear
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
<div class="text-right noprint">
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
|
<span class="fa fa-search" aria-hidden="true"></span> Apply
|
||||||
|
</button>
|
||||||
|
<a href="." class="btn btn-default">
|
||||||
|
<span class="fa fa-remove" aria-hidden="true"></span> Clear
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user