This hardcoding is necessary to get layout correct in all cases
authorCharles Connell <charles@connells.org>
Mon, 14 Apr 2014 22:29:29 +0000 (18:29 -0400)
committerCharles Connell <charles@connells.org>
Mon, 14 Apr 2014 22:29:42 +0000 (18:29 -0400)
karmaworld/assets/css/home.css
karmaworld/templates/partial/add_course.html

index 8b0be412f55d218f0a61aff7364c0a4c97636c6f..07f595ec179699ca62f1a6b7c35f595aaf8281cd 100644 (file)
@@ -63,6 +63,3 @@ label.validation_error {
   color: #F04124;
 }
 
-.add-course-field {
-  min-height: 100px;
-}
index f109a484fb1ec120585c20efdc0b71b517f66a90..5ab4073479d329fca92482a91b9d76cdb5510571 100644 (file)
     {% if course_form.non_field_errors %}
       <div class="row">
         <div class="small-12 columns">
-          <ul>{% for error in course_form.non_field_errors %}
+          <ul class="validation_error">{% for error in course_form.non_field_errors %}
             <li><label class="validation_error">{{ error }}</label></li>
           {% endfor %}</ul>
         </div>
       </div>
     {% endif %}
 
+    {% for form in course_form.get_forms.itervalues %}
+      {% for hidden in form.hidden_fields %}
+        {{ hidden }}
+      {% endfor %}
+    {% endfor %}
+    {% for hidden in course_form.hidden_fields %}
+      {{ hidden }}
+    {% endfor %}
+    <div class="row">
+      <div class="small-6 columns add-course-field">
+        {% with course_form.get_forms.department.school as field %}
+          {{ field.errors|safe }}
+          <label for="{{ field.id_for_label }}">{{ field.label }}:</label>
+          {{ field }}
+        {% endwith %}
+      </div>
+      <div class="small-6 columns add-course-field">
+        {% with course_form.get_forms.department.name as field %}
+          {{ field.errors|safe }}
+          <label for="{{ field.id_for_label }}">{{ field.label }}:</label>
+          {{ field }}
+        {% endwith %}
+      </div>
+    </div>
 
     <div class="row">
-      {% for form in course_form.get_forms.itervalues %}
-        {% for hidden in form.hidden_fields %}
-          {{ hidden }}
-        {% endfor %}
-        {% for field in form.visible_fields %}
-            <div class="small-6 columns add-course-field">
-              {{ field.errors|safe }}
-              <label for="{{ field.id_for_label }}">{{ field.label }}:</label>
-              {{ field }}
-            </div>
-        {% endfor %}
-      {% endfor %}
+      <div class="small-6 columns add-course-field">
+        {% with course_form.get_forms.professor.name as field %}
+          {{ field.errors|safe }}
+          <label for="{{ field.id_for_label }}">{{ field.label }}:</label>
+          {{ field }}
+        {% endwith %}
+      </div>
+      <div class="small-6 columns add-course-field">
+        {% with course_form.get_forms.professor.email as field %}
+          {{ field.errors|safe }}
+          <label for="{{ field.id_for_label }}">{{ field.label }}:</label>
+          {{ field }}
+        {% endwith %}
+      </div>
+    </div>
 
-      {% for hidden in course_form.hidden_fields %}
-        {{ hidden }}
-      {% endfor %}
-      {% for field in course_form.visible_fields %}
-        <div class="small-6 columns end add-course-field">
+    <div class="row">
+      <div class="small-6 columns add-course-field">
+        {% with course_form.name as field %}
           {{ field.errors|safe }}
           <label for="{{ field.id_for_label }}">{{ field.label }}:</label>
           {{ field }}
-        </div>
-      {% endfor %}
+        {% endwith %}
+      </div>
+      <div class="small-6 columns add-course-field">
+        {% with course_form.url as field %}
+          {{ field.errors|safe }}
+          <label for="{{ field.id_for_label }}">{{ field.label }}:</label>
+          {{ field }}
+        {% endwith %}
+      </div>
     </div>
 
+    <div class="row">
+      <div class="small-12 columns add-course-field">
+        {% with course_form.instruction_url as field %}
+          {{ field.errors|safe }}
+          <label for="{{ field.id_for_label }}">{{ field.label }}:</label>
+          {{ field }}
+        {% endwith %}
+      </div>
+    </div>
 
     <div class="row">
       <div class="small-4 large-8 columns small-centered text-center">