pass a JS variable to viewer.js to load pdf.js workers from
[oweals/karmaworld.git] / karmaworld / templates / partial / add_course.html
1 {% load url from future %}
2 <script>
3   var json_course_list = "{% url 'json_school_list' %}"
4   var csrf_token = "{{ csrf_token }}";
5 </script>
6 <script src="{{ STATIC_URL }}js/lightbox-add-course.js"></script>
7
8 <section id="add-course-form">
9   <form method="POST" action="{% url 'home' %}">
10   {% csrf_token %}
11
12     <div class="row">
13       <div class="ten columns offset-by-one end">
14         {{ course_form.non_field.errors }}
15       </div>
16     </div>
17
18
19     <div class="row">
20       <div class="ten columns offset-by-one end">
21         <legend>
22           School
23          {% if course_form.school.errors %}
24           <span style="color:red">
25           * there was an error with this field
26           </span>
27          {% endif %}
28         </legend>
29         <div>
30           <input id="str_school" class="" type="text" name="str_school"/>
31           <input id="id_school" name="school" type='hidden'/>
32         </div>
33       </div>
34     </div> <!-- .row -->
35
36     <div class="row">
37       <div class="ten columns offset-by-one end">
38         <legend>Course Name: 
39           {% if course_form.name.errors %}
40             <span style="color:red">
41             * there was an error with this field
42             </span>
43           {% endif %}
44         </legend>
45         <input id="id_name" class="" type="text" name="name" maxlength="255" />
46       </div>
47     </div> <!-- .row -->
48
49     <div class="row">
50       <div class="five columns offset-by-one">
51         <legend class="">
52           Instructor Name:
53           {% if course_form.instructor_name.errors %}
54             <span style="color:red">
55             * there was an error with this field
56             </span>
57           {% endif %}
58         </legend><!-- -->
59         <input id="id_instructor_name" class="" type="text" name="instructor_name" maxlength="75" />
60       </div>
61
62       <div class="five columns end">
63         <legend class="">
64           Instructor Email:
65           {% if course_form.instructor_email.errors %}
66             <span style="color:red">
67             * there was an error with this field
68             </span>
69           {% endif %}
70         </legend>
71         <input id="id_instructor_email" class="" type="text" name="instructor_email" maxlength="75" />
72       </div><!--  -->
73     </div> <!-- .row .lightbox_row -->
74
75     <div class="row">
76       <div class="ten columns offset-by-one end">
77         <legend>Course url:
78           {% if course_form.url.errors %}
79             <span style="color:red">
80             * there was an error with this field
81             </span>
82           {% endif %}
83         </legend>
84         <input id="id_url" class="" type="text" name="url" maxlength="255" />
85       </div>
86     </div> <!-- .row -->
87
88     <div class="row">
89       <div class="three columns centered">
90         <button id="save-btn">
91           <i class=icon-save></i> Save
92         </div>
93       </div>
94     </div>
95
96   </form>
97 </section>