Browse Source

Add helper class to have form without floated elements

and apply for task chooser
Dan Braghis 4 years ago
parent
commit
310ea2af35

+ 21 - 0
client/scss/elements/_forms.scss

@@ -64,6 +64,27 @@ label,
     }
 }
 
+// Provide a way to "unfloat" all form elements
+.no-float-elements {
+    label,
+    .label {
+        display: block;
+        float: none;
+        padding: 1.2em 0 0.8em;
+        width: auto;
+    }
+
+    li > label,
+    li > .label {
+        padding-top: 0;
+    }
+
+    .helptext {
+        display: inline-block;
+        margin-bottom: 0.8em;
+    }
+}
+
 input,
 textarea,
 select,

+ 1 - 1
wagtail/admin/templates/wagtailadmin/workflows/task_chooser/includes/create_form.html

@@ -3,7 +3,7 @@
 {{ form.media.css }}
 {{ form.media.js }}
 
-<form class="task-create" action="{{ add_url }}" enctype="multipart/form-data" method="POST" novalidate>
+<form class="task-create no-float-elements" action="{{ add_url }}" enctype="multipart/form-data" method="POST" novalidate>
     {% csrf_token %}
 
     {{ form }}