Prevent changes of column width on events form
authorMagnus Hagander <magnus@hagander.net>
Wed, 6 Dec 2017 03:14:37 +0000 (12:14 +0900)
committerMagnus Hagander <magnus@hagander.net>
Wed, 6 Dec 2017 03:14:37 +0000 (12:14 +0900)
Do this by setting the max width of the lefthand column in the table, so
it doesn't change when the checkbox for community events is clicked.

A better solution would of course be to make the forms properly
responsive, but that's part of a "next generation website", rather than
a quick fix...

media/css/layout.css
templates/base/form.html

index e7a828c358eb5a0772162edeb632c2f37d1d4b10..308ba5a3178b61838206234cb7bdd8f08265382d 100644 (file)
@@ -667,6 +667,10 @@ TABLE.pgGenericFormTable TR TH SPAN.formfieldhelp {
   font-style: italic;
 }
 
+TABLE.pgGenericFormTable TR TH.formfieldnamecontainer {
+  max-width: 300px;
+}
+
 /* Misc Classes */
 
 .pgClearBoth {
index a9416e04decf6bcd92939023dc49896a42143b4a..87f1c6e49763c9ac877dfe2683e2398d7b8a98ef 100644 (file)
@@ -24,7 +24,7 @@
  </tr>
  {%endif%}
  <tr {%if field.errors%}class="errorinfo"{%endif%}>
-  <th>{{field.label_tag}}{%if field.help_text%}{%if field.field.widget|class_name == "Textarea"%}<br/>
+  <th class="formfieldnamecontainer">{{field.label_tag}}{%if field.help_text%}{%if field.field.widget|class_name == "Textarea"%}<br/>
    <span class="formfieldhelp">{{field.help_text|safe}}</span>{%endif%}{%endif%}
   </th>
   <td>{{field}}</td>