welcome_privacy.html 5.4 KB
Newer Older
1 2
{% extends 'layouts/base.html' %}

3
{% block title %} SRCT RoomList | Welcome | Step 2 of 4 {% endblock %}
4

Daniel W Bond's avatar
Daniel W Bond committed
5
{% block message_queue %}
6 7 8 9
{% endblock %}

{% block content %}

10 11 12 13 14 15
<div class="progress">
  <div class="progress-bar" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width: 50%;">
    <span class="sr-only">50% complete</span>
  </div>
</div>

16 17
{% include 'room_change_warning.html' %}

18 19 20
<div class="page-header" id="banner">
  <div class="row">
    <div class="col-md-12 text-center">
21
      <h1>Welcome to <strong>SRCT</strong>ROOMLIST! <small>Step 2 of 4</small></h1>
22 23 24 25
    </div>
  </div>
</div>

26 27
<div class="row">
  <div class="col-md-8 col-md-offset-2">
28
    <p class="text-center">Great, {{ request.user.student.get_first_name_or_uname }}! Now to your housing information and settings. Here, you'll select which room you live in, and then choose who you want to be able to see that information.</p>
29 30
    <p class="text-center">If you don't live on campus, you can select 'No' and move right along.</p>
    <p class="text-center">For on campus students, here you'll select which room you live in, and then choose who you want to be able to see that information.</p>
31 32 33 34 35
    <p class="text-center"><strong>By default, your privacy is set to 'Floor'.</strong> That means only other students <em>living on your floor</em> can see your room or links to your social media profiles.
    You can choose to set your privacy to '<strong>Building</strong>', which will make your room visible to everyone living in your building, or to '<strong>Campus</strong>', where it will be visible to anyone with a current Mason username and password.</p>
    <p class="text-center">To close a rather straightforward privacy loophole, you can only change your room a limited number of times a year, after which you will need to
    <a href="mailto:roomlist@lists.srct.gmu.edu?Subject=I%20Don%27t%20Know%20Where%20I%20Live%3A%20Halp%20Pls">email us</a>.
    </p>
36
    <p class="text-center">A select number of locations <a href="{% url 'list_buildings' %}#Unsupported">on campus</a> are not currently supported. You are still welcome to use roomlist as an interactive directory until we add support.</p>
37 38 39
  </div>
</div>

40 41 42 43 44
<div class="row">
  <div class="col-md-8 col-md-offset-2">

    <div class="panel panel-default">
      <div class="panel-heading">
45
        <h1 class="panel-title text-center"><strong>Room & Privacy</strong></h1>
46 47 48
      </div>

      <div class="panel-body">
49
        {% if not request.user.student.recent_changes > 2 %}
50
        {% spaceless %}
51 52 53 54 55 56 57 58 59
        {% if my_form.non_field_errors %}
        <hr />
        <ul class="text-center">
          {% for error in form.non_field_errors %}
            <li>{{ error }}</li>
          {% endfor %}
        </ul>
        <hr />
        {% endif %}
60
        <form class="form-horizontal" autocomplete="off" action="" method="post">{% csrf_token %}
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
          <fieldset>
            <div class="form-group">
              <label for="{{ my_form.on_campus.id_for_label }}" class="col-md-3">
                Do You Live on Campus?
              </label>
                {% for option in my_form.on_campus %}
                  <label class="radio-inline">{{ option.choice_label }}{{ option.tag }}</label>
                {% endfor %}
              </div>
            <div id="lives-on-campus">
              <div class="form-group">
                <div class="col-md-12">
                  {{ my_form.room }}
                </div>
              </div>
              <div class="form-group">
                <label for="{{ my_form.privacy.id_for_label }}" class="col-md-2">
                  Privacy
                </label>
                  {{ my_form.privacy }}
              </div>
            </div>
          </fieldset>
84 85
          <input type="submit" value="Save" class="btn btn-primary"/>
        </form>
86
        {% endspaceless %}
87
        {% else %}
88
        <a href="{% url 'welcomeMajor' %}">
89 90 91
          <button type="button" class="btn btn-primary">Continue</button>
        </a>
        {% endif %}
92 93 94 95 96 97
      </div>
    </div>

  </div>
</div>

98 99 100 101 102 103 104 105 106
<div class="row">
  <div class="col-md-8 col-md-offset-2 text-center">
    <div class="alert alert-danger" role="alert">
      <p><i class="fa fa-exclamation-circle fa-fw fa-lg"></i> <strong>Changing your room here changes it only on this particular site.</strong></p>
      <p>To actually switch your room, you'll need to go through a lengthy process with the Housing Office.</p>
    </div>
  </div>
</div>

107

108 109 110 111 112
{% endblock content %}

{% block javascript %}
  <script type="text/javascript" src="/static/js/jquery.chained.min.js"></script>
  <script>
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
    // toggle room selection availability
    // can see if on campus, cannot see if not on campus
    $(document).ready(function() {
      var $radio = $('input:radio[name=on_campus]');
      // when first rendering the page
      if($radio.filter('[value=False]').is(':checked')) {
        $("#lives-on-campus").hide();
      } else {
        $("#lives-on-campus").show();
      }
      // if student changes the value
      $($radio.filter('[value=False]').click(function(){
        $("#lives-on-campus").slideUp();
      }));
      $($radio.filter('[value=True]').click(function(){
        $("#lives-on-campus").slideDown();
      }));
    });
    $("#lives-on-campus").hide();

    // room selection
134 135 136 137 138
    $("#building").chained("#neighborhood");
    $("#floor").chained("#building");
    $("#room").chained("#floor");
  </script>
{% endblock javascript %}