.
This commit is contained in:
+1
-29
@@ -89,36 +89,15 @@ class QuestionForm(ModelForm):
|
||||
|
||||
self.helper.layout = Layout(
|
||||
Div(
|
||||
HTML("<h4 class='clearfix' id='abnormality-label'>Abnormality</h4>"),
|
||||
Field('abnormality', css_class='form-control'),
|
||||
HTML("<h4 class='clear-both' id='region-label'>Region</h4>"),
|
||||
Field('region', css_class='form-control'),
|
||||
css_class='clearfix abnormal-fields'
|
||||
),
|
||||
HTML("<h4 class='clear-both' id='examination-label'>Examination*</h4>"),
|
||||
Field('examination', css_class='form-control'),
|
||||
Div(InlineRadios('laterality', css_class='form-control'), css_class='clearfix clear-both'),
|
||||
Field('history', css_class='form-control'),
|
||||
Field('marking_guidance', css_class='form-control'),
|
||||
Field('feedback', css_class='form-control'),
|
||||
Field('open_access', css_class='form-control'),
|
||||
HTML("<h4 class='clear-both' id='exams-label'>Exams</h4>"),
|
||||
Field('exams', css_class='form-control'),
|
||||
)
|
||||
|
||||
self.fields["abnormality"] = ModelMultipleChoiceField(
|
||||
required=False,
|
||||
queryset=Abnormality.objects.all(),
|
||||
widget=FilteredSelectMultiple(verbose_name="Abnormality", is_stacked=False),
|
||||
)
|
||||
self.fields["abnormality"].label = ""
|
||||
|
||||
self.fields["region"] = ModelMultipleChoiceField(
|
||||
required=False,
|
||||
queryset=Region.objects.all(),
|
||||
widget=FilteredSelectMultiple(verbose_name="Region", is_stacked=False),
|
||||
)
|
||||
self.fields["region"].label = ""
|
||||
))
|
||||
|
||||
self.fields["examination"] = ModelMultipleChoiceField(
|
||||
queryset=Examination.objects.all(),
|
||||
@@ -126,10 +105,6 @@ class QuestionForm(ModelForm):
|
||||
)
|
||||
self.fields["examination"].label = ""
|
||||
|
||||
self.fields["laterality"] = ChoiceField(
|
||||
choices=Question.LATERALITY_CHOICES, required=False, widget=RadioSelect()
|
||||
)
|
||||
|
||||
if self.user.groups.filter(name="shorts_checker").exists():
|
||||
exam_queryset = Exam.objects.all()
|
||||
else:
|
||||
@@ -188,9 +163,6 @@ class QuestionForm(ModelForm):
|
||||
# fields = ['due_back']
|
||||
# fields = '__all__'
|
||||
fields = [
|
||||
"abnormality",
|
||||
"region",
|
||||
"laterality",
|
||||
"examination",
|
||||
# "site",
|
||||
"feedback",
|
||||
|
||||
Reference in New Issue
Block a user