Private
Public Access
1
0

search form in list view

This commit is contained in:
Sander Roosendaal
2018-12-08 09:26:43 +01:00
parent cc40615f46
commit 5496a0f533
2 changed files with 9 additions and 4 deletions

View File

@@ -27,7 +27,12 @@ class LoginForm(forms.Form):
# search form # search form
class SearchForm(forms.Form): class SearchForm(forms.Form):
q = forms.CharField(max_length=255,required=False,initial='Search') q = forms.CharField(max_length=255,required=False,
widget=forms.TextInput(
attrs={'placeholder': 'Search'}),
label='Search')
# simple form for Contact page. Sends email to info@rowsandall.com # simple form for Contact page. Sends email to info@rowsandall.com
class EmailForm(forms.Form): class EmailForm(forms.Form):

View File

@@ -85,9 +85,9 @@
{% else %} {% else %}
<form id="searchform" action="/rowers/list-workouts/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}" <form id="searchform" action="/rowers/list-workouts/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
method="get" accept-charset="utf-8"> method="get" accept-charset="utf-8">
{% endif %} {% endif %}
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search"> {{ searchform }}
<input type="submit"> <input type="submit" value="GO">
</input> </input>
</form> </form>
</p> </p>