Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
roomlist
Commits
37197e6d
Commit
37197e6d
authored
Sep 30, 2016
by
Daniel W Bond
Browse files
added chosen.js single selectors for major to welcome_privacy and update_student templates
parent
e51fa7da
Changes
4
Hide whitespace changes
Inline
Side-by-side
roomlist/accounts/templates/update_student.html
View file @
37197e6d
...
...
@@ -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 %}
roomlist/accounts/views.py
View file @
37197e6d
...
...
@@ -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
...
...
roomlist/welcome/templates/welcome_privacy.html
View file @
37197e6d
...
...
@@ -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 %}
roomlist/welcome/views.py
View file @
37197e6d
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment