adm18/ntuh/registry/forms.py

25 lines
757 B
Python
Raw Normal View History

from django import forms
from haystack.forms import SearchForm, ModelSearchForm
class PathologyReportForm(SearchForm):
# class PathologyReportForm(ModelSearchForm):
q = forms.CharField(
required=False,
# label=_("Search"),
widget=forms.TextInput(attrs={"type": "search"}),
)
# def __init__(self, *args, **kwargs):
# super().__init__(*args, **kwargs)
# self.fields["models"] = forms.MultipleChoiceField(
# choices=[
# # ('registry.opnote', 'Op notes'),
# ('registry.pathologyreport', 'Pathology reports')
# ],
# required=False,
# # label=_("Search In"),
# widget=forms.CheckboxSelectMultiple,
# )