Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
roomlist
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
23
Issues
23
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
roomlist
Commits
ea31ab92
Commit
ea31ab92
authored
May 25, 2017
by
Daniel W Bond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RAs or RDs cannot indicate that they live off-campus. Includes helper text acknowledging as much.
parent
15f72acc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
roomlist/accounts/templates/update_student.html
roomlist/accounts/templates/update_student.html
+4
-0
roomlist/accounts/views.py
roomlist/accounts/views.py
+8
-0
No files found.
roomlist/accounts/templates/update_student.html
View file @
ea31ab92
...
...
@@ -155,6 +155,10 @@
<p
class=
"text-danger"
><i
class=
"fa fa-exclamation-triangle fa-fw"
></i>
{{ error }}
</p>
{% endfor %}
{% endif %}
{% if request.user.student.is_staff %}
<p
class=
"help-block"
>
Contact us if you are no longer a Resident Advisor or Director at
<a
href=
"mailto:roomlist@lists.srct.gmu.edu"
>
roomlist@lists.srct.gmu.edu
</a>
.
</p>
{% endif %}
<div
class=
"form-group"
>
<label
for=
"{{ my_form.on_campus.id_for_label }}"
class=
"col-md-3 col-sm-4 col-xs-5"
>
Do You Live on Campus?
...
...
roomlist/accounts/views.py
View file @
ea31ab92
...
...
@@ -145,6 +145,10 @@ class UpdateStudent(LoginRequiredMixin, FormValidMessageMixin, FormView):
else
:
form
.
fields
[
'room'
].
widget
.
user
=
self
.
request
.
user
# RAs and RDs cannot move off campus
if
me
.
is_staff
():
form
.
fields
[
'on_campus'
].
disabled
=
True
# bootstrap
form
.
fields
[
'first_name'
].
widget
.
attrs
[
'class'
]
=
'form-control'
form
.
fields
[
'last_name'
].
widget
.
attrs
[
'class'
]
=
'form-control'
...
...
@@ -199,6 +203,10 @@ class UpdateStudent(LoginRequiredMixin, FormValidMessageMixin, FormView):
me
.
on_campus
=
on_campus
me
.
room
=
form_room
# if you are an RA or an RD, you live on campus
if
me
.
is_staff
():
me
.
on_campus
=
True
try
:
# in case someone disabled the js, limit processing to only the first
# two majors passed by the user
...
...
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