Commit 7dd21aa5 authored by Patrick Kimber's avatar Patrick Kimber
parent ae4ddb31
Pipeline #81866684 passed with stage
in 5 minutes and 35 seconds
......@@ -182,20 +182,25 @@ class SearchForm(forms.Form):
super().__init__(*args, **kwargs)
# invoice date
f = self.fields["invoice_date"]
f.label = ""
f.widget.attrs.update({"class": "datepicker pure-u-23-24"})
# invoice number
f = self.fields["number"]
f.label = ""
f.widget.attrs.update(
{"class": "pure-u-23-24", "placeholder": "Number"}
)
# currency
f = self.fields["currency"]
f.empty_label = "All currencies..."
f.label = ""
f.queryset = currency_qs
f.widget.attrs.update({"class": "chosen-select pure-u-23-24"})
# payment processor
f = self.fields["payment_processor"]
if display_payment_processor:
f.empty_label = "All processors..."
f.label = ""
f.queryset = payment_processor_qs
f.widget.attrs.update({"class": "chosen-select pure-u-23-24"})
else:
......
......@@ -40,8 +40,36 @@
</div>
</div>
<div class="pure-g">
<div class="pure-u-1 pure-u-lg-2-3">
{% include '_form.html' with method='get' no_token=True inline_checkbox=True aligned=True submit='Search' %}
<div class="pure-u-1">
<form action="." method="GET" class="pure-form">
{% if form.non_field_errors %}
{{ form.non_field_errors }}
{% endif %}
<fieldset>
<div class="pure-g">
{% for field in form.visible_fields %}
<div class="pure-u-md-1-5">
{% if inline_checkbox and field.field.widget.input_type %}
{% include '_form_field.html' with field=field field_type=field.field.widget.input_type %}
{% else %}
{% include '_form_field.html' with field=field %}
{% endif %}
</div>
{% endfor %}
<div class="pure-u-md-1-5">
<div class="pure-control-group">
<button type="submit" class="pure-button pure-button-primary">Search...</button>
</div>
</div>
</div>
</fieldset>
{% for hidden in form.hidden_fields %}
{{ hidden }}
{% endfor %}
{% if next %}
<input type="hidden" name="next" value="{{ next }}" />
{% endif %}
</form>
</div>
</div>
<div class="pure-g">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment