From d382c0cba75295999eaba20e2d2b18abfa42cf09 Mon Sep 17 00:00:00 2001 From: Seth Woodworth Date: Wed, 27 Mar 2013 17:51:37 -0400 Subject: [PATCH] add errors to add-course form --- karmaworld/templates/partial/add_course.html | 40 ++++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/karmaworld/templates/partial/add_course.html b/karmaworld/templates/partial/add_course.html index 7a6f5c3..7b65a58 100644 --- a/karmaworld/templates/partial/add_course.html +++ b/karmaworld/templates/partial/add_course.html @@ -6,13 +6,25 @@
-
+ {% csrf_token %} +
+
+ {{ course_form.non_field.errors }} +
+
+ +
School + {% if course_form.school.errors %} + + * there was an error with this field + + {% endif %}
@@ -23,7 +35,13 @@
- Course Name: + Course Name: + {% if course_form.name.errors %} + + * there was an error with this field + + {% endif %} +
@@ -32,6 +50,11 @@
Instructor Name: + {% if course_form.instructor_name.errors %} + + * there was an error with this field + + {% endif %}
@@ -39,6 +62,11 @@
Instructor Email: + {% if course_form.instructor_email.errors %} + + * there was an error with this field + + {% endif %}
@@ -46,7 +74,13 @@
- Course url: + Course url: + {% if course_form.url.errors %} + + * there was an error with this field + + {% endif %} +
-- 2.25.1