diff options
author | manojvaghela | 2020-03-18 16:36:52 +0530 |
---|---|---|
committer | manojvaghela | 2020-03-18 16:45:42 +0530 |
commit | 8835afbc95c1a398cf62da7880596e7a302ae148 (patch) | |
tree | 6eb2193f420eb5da143d3569026fc9ff1387f219 /yaksh/forms.py | |
parent | 15ce39acb70056bdfb9820efa634d704a963cb84 (diff) | |
download | online_test-8835afbc95c1a398cf62da7880596e7a302ae148.tar.gz online_test-8835afbc95c1a398cf62da7880596e7a302ae148.tar.bz2 online_test-8835afbc95c1a398cf62da7880596e7a302ae148.zip |
Search bar added
Diffstat (limited to 'yaksh/forms.py')
-rw-r--r-- | yaksh/forms.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/yaksh/forms.py b/yaksh/forms.py index 7d5362b..c0f40ea 100644 --- a/yaksh/forms.py +++ b/yaksh/forms.py @@ -49,6 +49,12 @@ test_case_types = ( ("floattestcase", "Float Testcase"), ) +status_types = ( + ('select','Select Status'), + ('active', 'Active'), + ('closed', 'Inactive'), + ) + UNAME_CHARS = letters + "._" + digits PWD_CHARS = letters + punctuation + digits @@ -377,6 +383,19 @@ class QuestionFilterForm(forms.Form): ) +class SearchFilterForm(forms.Form): + search_tags = forms.CharField( + label='Search Tags', + widget=forms.TextInput(attrs={'placeholder': 'Search', + 'class': form_input_class,}), + required=False + ) + search_status = forms.CharField(max_length=16, widget=forms.Select( + choices=status_types, + attrs={'class': 'custom-select'}), + ) + + class CourseForm(forms.ModelForm): """ course form for moderators """ class Meta: |