From cfe88720a296ab8c8961876e8c89082f947c2855 Mon Sep 17 00:00:00 2001 From: Jason Yuan Date: Fri, 18 Dec 2020 19:27:08 -0600 Subject: [PATCH] vertical align checkbox --- main/forms.py | 2 +- .../main/dashboard/drives/create.html | 42 +++++++++++-------- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/main/forms.py b/main/forms.py index ec66474c0..d860b1fed 100644 --- a/main/forms.py +++ b/main/forms.py @@ -231,7 +231,7 @@ class Meta: choices=STATES, attrs={"class": "form-control"} ), "require_user_addresses": forms.CheckboxInput( - attrs={"class": "custom-control-inline form-control"} + attrs={"class": "form-check-input"} ), } diff --git a/main/templates/main/dashboard/drives/create.html b/main/templates/main/dashboard/drives/create.html index ebfe7e558..94606d598 100644 --- a/main/templates/main/dashboard/drives/create.html +++ b/main/templates/main/dashboard/drives/create.html @@ -12,23 +12,31 @@
Create a Drive
-
{% csrf_token %} - -
- {% for field in form %} -
- {{ field.errors }} - {{ field.label_tag }}{{ field }} - {% if field.help_text %} -

{{ field.help_text|safe }}

- {% endif %} -
- {% endfor %} -
-
- -
-
+
+ {% csrf_token %} +
+ {% for field in form %} +
+ {% if "require_user_addresses" in field.label_tag %} +
+ {{ field.label_tag }} + {{ field }} +
+ {% else %} + {{ field.errors }} + {{ field.label_tag }} + {{ field }} + {% if field.help_text %} +

{{ field.help_text|safe }}

+ {% endif %} + {% endif %} +
+ {% endfor %} +
+
+ +
+
{% endif %} {% if not verified %}