Commit 37197e6d authored by Daniel W Bond's avatar Daniel W Bond
Browse files

added chosen.js single selectors for major to welcome_privacy and update_student templates

parent e51fa7da
......@@ -2,6 +2,10 @@
{% block title %} SRCT Roomlist | Student | {{ request.user.student.get_full_name_or_uname }} | Update {% endblock %}
{% block css %}
<link href="/static/css/chosen.min.css" rel="stylesheet" media="screen">
{% endblock css %}
{% block message_queue %}
{% endblock %}
......@@ -261,6 +265,10 @@
{% endblock content %}
{% block javascript %}
<script type="text/javascript" src="/static/js/jquery.chained.min.js"></script>
<script type="text/javascript" src="/static/js/chained.min.js"></script>
<script type="text/javascript" src="/static/js/chosen.min.js"></script>
<script>
$(".chosen-select").chosen()
</script>
{% include 'room_selection_script.html' %}
{% endblock javascript %}
......@@ -177,6 +177,9 @@ class UpdateStudent(LoginRequiredMixin, FormValidMessageMixin, FormView):
form.fields['last_name'].widget.attrs['class'] = 'form-control'
form.fields['graduating_year'].widget.attrs['class'] = 'form-control'
# chosen
form.fields['major'].widget.attrs['class'] = 'chosen-select'
context['my_form'] = form
return context
......
......@@ -2,6 +2,10 @@
{% block title %} SRCT RoomList | Welcome | Step 2 of 4 {% endblock %}
{% block css %}
<link href="/static/css/chosen.min.css" rel="stylesheet" media="screen">
{% endblock css %}
{% block message_queue %}
{% endblock %}
......@@ -120,6 +124,10 @@
{% endblock content %}
{% block javascript %}
<script type="text/javascript" src="/static/js/jquery.chained.min.js"></script>
<script type="text/javascript" src="/static/js/chained.min.js"></script>
<script type="text/javascript" src="/static/js/chosen.min.js"></script>
<script>
$(".chosen-select").chosen()
</script>
{% include 'room_selection_script.html' %}
{% endblock javascript %}
......@@ -104,6 +104,7 @@ class WelcomePrivacy(LoginRequiredMixin, FormView):
'privacy': me.privacy, })
form.fields['room'].widget.user = self.request.user
form.fields['major'].widget.attrs['class'] = 'chosen-select'
context['my_form'] = form
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment