Refactor QuestionReviewForm to use RadioSelect for status and update template for improved layout
This commit is contained in:
+4
-4
@@ -11,7 +11,7 @@ from django.forms import (
|
||||
DateField,
|
||||
SplitDateTimeField,
|
||||
SplitDateTimeWidget,
|
||||
Select,
|
||||
|
||||
)
|
||||
from django.forms import inlineformset_factory
|
||||
from atlas.models import CaseCollection
|
||||
@@ -840,9 +840,9 @@ class QuestionReviewForm(ModelForm):
|
||||
model = QuestionReview
|
||||
fields = ["status", "comment"]
|
||||
widgets = {
|
||||
"status": Select(attrs={"class": "form-select form-select-sm"}),
|
||||
"comment": TextInput(attrs={"class": "form-control form-control-sm", "placeholder": "Comment (optional)"}),
|
||||
}
|
||||
"status": RadioSelect(attrs={"class": "form-check-input"}),
|
||||
"comment": TextInput(attrs={"class": "form-control form-control-sm", "placeholder": "Comment (optional)"}),
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
# Accept an optional `user` for future validation/use
|
||||
|
||||
Reference in New Issue
Block a user