diff --git a/generic/forms.py b/generic/forms.py index c1c78e0e..1c95620d 100755 --- a/generic/forms.py +++ b/generic/forms.py @@ -842,7 +842,7 @@ class QuestionReviewForm(ModelForm): widgets = { # 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}), + "comment": Textarea(attrs={"class": "form-control form-control-sm", "placeholder": "Comment (optional)", "rows": 2, "autofocus": "autofocus"}), } def __init__(self, *args, **kwargs): diff --git a/generic/templates/generic/partials/question_review_form.html b/generic/templates/generic/partials/question_review_form.html index a1d7726b..a8b4d8c6 100644 --- a/generic/templates/generic/partials/question_review_form.html +++ b/generic/templates/generic/partials/question_review_form.html @@ -9,21 +9,12 @@
- {% for radio in form.status %} + {% with current_status=form.status.value %} + {% for radio in form.status %} {% comment %} Render colored button for each choice by checking value {% endcomment %} - {{ radio.tag }} - {% if radio.choice_value == 'AC' %} - - {% elif radio.choice_value == 'OD' %} - - {% elif radio.choice_value == 'ER' %} - - {% elif radio.choice_value == 'RJ' %} - - {% else %} - - {% endif %} - {% endfor %} + + {% endfor %} + {% endwith %}
{% if form.status.errors %}
{{ form.status.errors|join:", " }}
diff --git a/sbas/templates/sbas/base.html b/sbas/templates/sbas/base.html index 2148a89d..b61ac631 100644 --- a/sbas/templates/sbas/base.html +++ b/sbas/templates/sbas/base.html @@ -5,46 +5,52 @@ {% endblock %} {% block navigation %} -
- + {% endblock %} {% block content %} {% endblock %}