strat tidying up anatomy question form
This commit is contained in:
+15
-4
@@ -33,6 +33,9 @@ from dal import autocomplete
|
||||
|
||||
from tinymce.widgets import TinyMCE
|
||||
|
||||
from crispy_forms.helper import FormHelper
|
||||
from crispy_forms.layout import Submit
|
||||
|
||||
class AnatomyAnswerForm(ModelForm):
|
||||
class Meta:
|
||||
model = UserAnswer
|
||||
@@ -76,6 +79,14 @@ class AnatomyQuestionForm(ModelForm):
|
||||
ModelForm.__init__(self, *args, **kwargs)
|
||||
|
||||
super(AnatomyQuestionForm, self).__init__(*args, **kwargs)
|
||||
|
||||
self.helper = FormHelper()
|
||||
self.helper.form_id = 'id-anatomy-question-form'
|
||||
#self.helper.form_class = 'blueForms'
|
||||
#self.helper.form_method = 'post'
|
||||
#self.helper.form_action = ''
|
||||
|
||||
#self.helper.add_input(Submit('submit', 'Submit'))
|
||||
# self.fields['question'].widget.attrs = {'class': 'question-form', 'rows': 10, 'cols': 100}
|
||||
# self.fields['feedback'].widget.attrs = {'class': 'feedback-form', 'rows': 10, 'cols': 100}
|
||||
self.fields["question_type"] = ModelChoiceField(
|
||||
@@ -145,15 +156,15 @@ class AnatomyQuestionForm(ModelForm):
|
||||
fields = [
|
||||
"question_type",
|
||||
"image",
|
||||
"answer_help",
|
||||
"answer_suggest_incorrect",
|
||||
"region",
|
||||
"description",
|
||||
"modality",
|
||||
"region",
|
||||
"structure",
|
||||
"feedback",
|
||||
"examination",
|
||||
"body_part",
|
||||
"description",
|
||||
"answer_help",
|
||||
"answer_suggest_incorrect",
|
||||
"open_access",
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user