Enhance QuestionReviewForm layout with Bootstrap styling for status buttons and improve comment field presentation
This commit is contained in:
+4
-3
@@ -31,7 +31,7 @@ from generic.models import (
|
||||
)
|
||||
|
||||
from django.contrib.admin.widgets import FilteredSelectMultiple
|
||||
from django.forms.widgets import RadioSelect, TextInput, Textarea
|
||||
from django.forms.widgets import RadioSelect, Textarea
|
||||
|
||||
from rapids.models import Rapid
|
||||
from anatomy.models import AnatomyQuestion
|
||||
@@ -840,8 +840,9 @@ class QuestionReviewForm(ModelForm):
|
||||
model = QuestionReview
|
||||
fields = ["status", "comment"]
|
||||
widgets = {
|
||||
"status": RadioSelect(attrs={"class": "form-check-input"}),
|
||||
"comment": TextInput(attrs={"class": "form-control form-control-sm", "placeholder": "Comment (optional)"}),
|
||||
# Use Bootstrap "btn-check" inputs so we can style labels as button toggles
|
||||
"status": RadioSelect(attrs={"class": "btn-check", "autocomplete": "off"}),
|
||||
"comment": Textarea(attrs={"class": "form-control form-control-sm", "placeholder": "Comment (optional)", "rows": 2}),
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user