summaryrefslogtreecommitdiff
path: root/yaksh/forms.py
diff options
context:
space:
mode:
authorPalaparthy Adityachandra2020-03-19 19:39:44 +0530
committerGitHub2020-03-19 19:39:44 +0530
commit1dbaec7dd8098701e11713faa0c9040a315e5fac (patch)
tree6ccba75def0cf132ad56638dfb655cfe52882acf /yaksh/forms.py
parent15ce39acb70056bdfb9820efa634d704a963cb84 (diff)
parentd642d4906801df836ecefa92544786f07b08dc77 (diff)
downloadonline_test-1dbaec7dd8098701e11713faa0c9040a315e5fac.tar.gz
online_test-1dbaec7dd8098701e11713faa0c9040a315e5fac.tar.bz2
online_test-1dbaec7dd8098701e11713faa0c9040a315e5fac.zip
Merge pull request #665 from manojvaghela/searchbarfinal
Search bar added
Diffstat (limited to 'yaksh/forms.py')
-rw-r--r--yaksh/forms.py19
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: