[FIX] RECRUITMENT: Close filter tag option for default filter
This commit is contained in:
@@ -178,14 +178,6 @@ class RecruitmentFilter(FilterSet):
|
||||
widget=forms.DateInput(attrs={"type": "date"}),
|
||||
)
|
||||
search = django_filters.CharFilter(method="filter_by_name")
|
||||
closed = django_filters.ChoiceFilter(
|
||||
choices=[
|
||||
(True, "Yes"),
|
||||
(None, "No"),
|
||||
],
|
||||
initial="no",
|
||||
empty_label="No",
|
||||
)
|
||||
is_active = django_filters.ChoiceFilter(
|
||||
choices=[
|
||||
(True, "Yes"),
|
||||
|
||||
@@ -13,9 +13,16 @@
|
||||
<label class="oh-label">{% trans "Start Date" %}</label>
|
||||
{{f.form.start_date}}
|
||||
</div>
|
||||
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans "Is Closed" %}</label>
|
||||
{% comment %} {{f.form.closed}} {% endcomment %}
|
||||
<select name="closed" id="closed" class="oh-select oh-select-2 w-100">
|
||||
<option value="unknown">{% trans "Unknown" %}</option>
|
||||
<option value="true">{% trans "True" %}</option>
|
||||
<option value="false" selected>{% trans "False" %}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div hidden>{{f.form.closed}}</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans "Company" %}</label>
|
||||
@@ -25,8 +32,10 @@
|
||||
<label class="oh-label">{% trans "End Date" %}</label>
|
||||
{{f.form.end_date}}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="oh-input-group">
|
||||
<label class="oh-label">{% trans "Is Published" %}</label>
|
||||
{{f.form.is_published}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
<!-- start of quick filters -->
|
||||
<div class="d-flex flex-row-reverse">
|
||||
|
||||
<span class="m-3" onclick="$('[name=closed]').val(''); $('[name=closed]').first().change(); $('.filterButton').click()" style="cursor: pointer">
|
||||
<span class="oh-dot oh-dot--small me-1" style="background-color:yellowgreen""></span>
|
||||
<span class="m-1" style="margin-left: 15px;cursor: pointer;" onclick="$('[name=closed]').val('false'); $('[name=closed]').first().change(); $('.filterButton').click()" style="cursor: pointer">
|
||||
<span class="oh-dot oh-dot--small me-1" style="background-color:yellowgreen"></span>
|
||||
{% trans "Open" %}
|
||||
</span>
|
||||
<span class="m-3" onclick="$('[name=closed]').val('True'); $('[name=closed]').first().change(); $('.filterButton').click()" style="cursor: pointer">
|
||||
<span class="m-1" style="margin-left: 15px;cursor: pointer;" onclick="$('[name=closed]').val('true'); $('[name=closed]').first().change(); $('.filterButton').click()" style="cursor: pointer">
|
||||
<span class="oh-dot oh-dot--small me-1" style="background-color:red" ></span>
|
||||
{% trans "Closed" %}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user