}
}
- // Set up the "Add Course" button at bottom
- // of page
- $('#add-course-btn').click(function() {
+ addCourse = function() {
// Show the add a course form
$('#add-course-form').show();
// Hide the add a course button
$('#add-course-btn').hide();
+ // Scroll the user's page to here
+ $('#add-course-divider').ScrollTo();
// Put focus in first input field
$('#str_school').focus();
- });
+ };
+
+ // Set up the "Add Course" button at bottom
+ // of page
+ $('#add-course-btn').click(addCourse);
// Set up the "Add Course" button in the
// page header
- $('#add_course_header_button').click(function() {
- // Show the add a course form
- $('#add-course-form').show();
- // Hide the add a course button
- $('#add-course-btn').hide();
- // Scroll the user's page to here
- $('#add-course-divider').ScrollTo();
- // Put focus in first input field
- $('#str_school').focus();
- });
+ $('#add_course_header_button').click(addCourse);
// Dismiss on exit x click FIXME
$(".lightbox_close").click(function() {
School
{% if course_form.school.errors %}
<span style="color:red">
- * there was an error with this field
+ Please select a school from the drop-down
</span>
{% endif %}
</legend>
<div>
- <input id="str_school" class="" type="text" name="str_school"/>
+ <input id="str_school" class="" type="text" name="str_school" placeholder="Select a school"/>
<input id="id_school" name="school" type='hidden'/>
</div>
</div>