.
This commit is contained in:
+5
-3
@@ -23,6 +23,7 @@ from tinymce.widgets import TinyMCE
|
|||||||
|
|
||||||
from dal import autocomplete
|
from dal import autocomplete
|
||||||
|
|
||||||
|
|
||||||
class ExaminationForm(ModelForm):
|
class ExaminationForm(ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Examination
|
model = Examination
|
||||||
@@ -161,7 +162,7 @@ class CaseForm(ModelForm):
|
|||||||
"description",
|
"description",
|
||||||
"history",
|
"history",
|
||||||
"condition",
|
"condition",
|
||||||
#"differential",
|
# "differential",
|
||||||
# "sign",
|
# "sign",
|
||||||
"open_access",
|
"open_access",
|
||||||
]
|
]
|
||||||
@@ -174,7 +175,7 @@ class CaseForm(ModelForm):
|
|||||||
# "mark_scheme": TinyMCE(attrs={"cols": 80, "rows": 30}),
|
# "mark_scheme": TinyMCE(attrs={"cols": 80, "rows": 30}),
|
||||||
"description": Textarea(attrs={"cols": 80, "rows": 5}),
|
"description": Textarea(attrs={"cols": 80, "rows": 5}),
|
||||||
"history": Textarea(attrs={"cols": 80, "rows": 5}),
|
"history": Textarea(attrs={"cols": 80, "rows": 5}),
|
||||||
"condition" : autocomplete.ModelSelect2(url='atlas:condition-autocomplete')
|
"condition": autocomplete.ModelSelect2(url="atlas:condition-autocomplete"),
|
||||||
}
|
}
|
||||||
|
|
||||||
def save(self, commit=True):
|
def save(self, commit=True):
|
||||||
@@ -200,12 +201,13 @@ class CaseForm(ModelForm):
|
|||||||
|
|
||||||
return instance
|
return instance
|
||||||
|
|
||||||
|
|
||||||
CaseDifferentialFormSet = inlineformset_factory(
|
CaseDifferentialFormSet = inlineformset_factory(
|
||||||
Case,
|
Case,
|
||||||
Differential,
|
Differential,
|
||||||
exclude=[],
|
exclude=[],
|
||||||
can_delete=True,
|
can_delete=True,
|
||||||
extra=0,
|
extra=1,
|
||||||
max_num=10,
|
max_num=10,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user