Commit ea31ab92 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

RAs or RDs cannot indicate that they live off-campus. Includes helper text acknowledging as much.

parent 15f72acc
......@@ -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=""></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?
......@@ -145,6 +145,10 @@ class UpdateStudent(LoginRequiredMixin, FormValidMessageMixin, FormView):
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 = form_room
# if you are an RA or an RD, you live on campus
if me.is_staff():
me.on_campus = True
# in case someone disabled the js, limit processing to only the first
# two majors passed by the user
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