]> git.parisson.com Git - mezzo.git/commitdiff
Move the help texts of the form to the right
authorJérémy Fabre <Jeremy@iMacdeJeremy2.fritz.box>
Wed, 15 Feb 2017 10:07:48 +0000 (11:07 +0100)
committerJérémy Fabre <Jeremy@iMacdeJeremy2.fritz.box>
Wed, 15 Feb 2017 10:07:48 +0000 (11:07 +0100)
app/static/src/sass/global/_forms.scss
app/templates/includes/form_fields.html

index 2de348ab211651c28331e488cf74421c26918376..298c38ca1e9e463c0db5a8338d62eb5aa148c09d 100644 (file)
@@ -29,6 +29,10 @@ $module: ".form";
 
     .form-group {
         @include margin-bottom(.5);
+
+        ul {
+            list-style-type: none;
+        }
     }
 
     input[type="submit"] {
@@ -41,6 +45,7 @@ $module: ".form";
         text-align: left;
         display: block;
         vertical-align: top;
+        float: left;
 
         @include padding(0.25 1 0.25 0);
         @include font-size(s);
@@ -50,12 +55,14 @@ $module: ".form";
         text-transform: uppercase;
 
         @include mq($until: xs) {
-            width: 100%;
-            display: block;
-            text-align: left;
+
         }
     }
 
+    span.help-block {
+        float: right;
+    }
+
     .help-block {
         @include font-size(xs);
 
index da26ee4c5e3efac1352a0d209aa9e0be7a6829c1..7e0f1308680a7a300c5f58863d0651533bf5c4f8 100644 (file)
     {% if field.errors %} has-error{% endif %}">
     <p>
     {% if field.label %}<label class="control-label" for="{{ field.auto_id }}">{{ field.label }}</label>{% endif %}
+    {% if field.help_text %}
+        <span class="help-block">{{ field.help_text }}</span>
+    {% endif %}
     {{ field }}
     </p>
     {% if field.errors %}
-    <p class="help-block">
-        {% for e in field.errors %}
-        {% if not forloop.first %} / {% endif %}{{ e }}
-        {% endfor %}
-    </p>
-    {% elif field.help_text %}
-    <p class="help-block">{{ field.help_text }}</p>
+        <p class="help-block">
+            {% for e in field.errors %}
+            {% if not forloop.first %} / {% endif %}{{ e }}
+            {% endfor %}
+        </p>
     {% endif %}
 </div>
 {% endif %}