updateStudent.html 5.73 KB
Newer Older
1
2
{% extends 'layouts/base.html' %}

3
{% block title %} SRCT Roomlist | Student | {{ request.user.student.get_full_name_or_uname }} | Update {% endblock %}
4

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

{% block content %}
9
10
{% load cache %}
{% cache 4 student_update request.user.username %}
11

12
13
{% include 'room_change_warning.html' %}

14
15
{% include 'messages.html' %}

16
17
18
<div class="page-header" id="banner">
  <div class="row">
    <div class="col-md-12 text-center">
19
      <h1><strong>SRCT</strong>ROOMLIST</a></strong> Student Update</h1>
20
21
22
23
24
    </div>
  </div>
</div>

<div class="row">
25
  <div class="col-md-12 text-center">
26
    <h2><strong>Welcome, {{ request.user.student.get_first_name_or_uname }}!</strong></h2>
27
28
29
30
31
  </div>
</div>

<br />

32
{% load socialaccount %}
33

34
35
{% get_social_accounts request.user as accounts %}

36
37
38
39
40
41
42
43
44
45
46
<div class="row">
  <div class="col-md-4">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h1 class="panel-title text-center"><strong>Social Media Settings</strong></h1>
      </div>
      <div class="panel-body">
        <p class="text-center">Verify your social media accounts to link them to other students.</p>
        <div class="row text-center">
          <div class="col-md-6">
          {% if accounts.facebook %}
47
48
49
50
51
          <p><i class="fa fa-check-square-o"></i> Verified!</p>
            <h4><i class="fa fa-facebook fa-2x"></i></h4>
            <h4>Facebook</h4>
          {% else %}
          <a href="{% provider_login_url 'facebook' process='connect' %}">
52
53
54
            <h4><i class="fa fa-facebook fa-2x"></i></h4>
            <h4>Facebook</h4>
          </a>
55
          {% endif %}
56
57
58
59
          </div>
          <div class="col-md-6">
          {% if accounts.google %}
            <p><i class="fa fa-check-square-o"></i> Verified!</p>
60
61
62
63
            <h4><i class="fa fa-google fa-2x"></i></h4>
            <h4>Google</h4>
          {% else %}
          <a href="{% provider_login_url 'google' process='connect' %}">
64
65
66
            <h4><i class="fa fa-google fa-2x"></i></h4>
            <h4>Google</h4>
          </a>
67
          {% endif %}
68
69
70
71
72
73
74
          </div>
        </div>
        <br />
        <div class="row text-center">
          <div class="col-md-6">
          {% if accounts.twitter %}
            <p><i class="fa fa-check-square-o"></i> Verified!</p>
75
76
77
78
            <h4><i class="fa fa-twitter fa-2x"></i></h4>
            <h4>Twitter</h4>
          {% else %}
          <a href="{% provider_login_url 'twitter' process='connect' %}">
79
80
81
            <h4><i class="fa fa-twitter fa-2x"></i></h4>
            <h4>Twitter</h4>
          </a>
82
          {% endif %}
83
84
85
86
          </div>
          <div class="col-md-6">
          {% if accounts.instagram %}
            <p><i class="fa fa-check-square-o"></i> Verified!</p>
87
88
89
90
            <h4><i class="fa fa-instagram fa-2x"></i></h4>
            <h4>Instagram</h4>
          {% else %}
          <a href="{% provider_login_url 'instagram' process='connect' %}">
91
92
93
            <h4><i class="fa fa-instagram fa-2x"></i></h4>
            <h4>Instagram</h4>
          </a>
94
          {% endif %}
95
96
          </div>
        </div>
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
        {% comment %}
        <br />
        <div class="row text-center">
          <div class="col-md-6">
          {% if accounts.tumblr %}
            <p><i class="fa fa-check-square-o"></i> Verified!</p>
            <h4><i class="fa fa-tumblr fa-2x"></i></h4>
            <h4>Tumblr</h4>
          {% else %}
          <a href="{% provider_login_url 'tumblr' process='connect' %}">
            <h4><i class="fa fa-tumblr fa-2x"></i></h4>
            <h4>Tumblr</h4>
          </a>
          {% endif %}
          </div>
          <div class="col-md-6">
          {% if accounts.github %}
            <p><i class="fa fa-check-square-o"></i> Verified!</p>
            <h4><i class="fa fa-github fa-2x"></i></h4>
            <h4>Github</h4>
          {% else %}
          <a href="{% provider_login_url 'github' process='connect' %}">
            <h4><i class="fa fa-github fa-2x"></i></h4>
            <h4>Github</h4>
          </a>
          {% endif %}
          </div>
        </div>
        {% endcomment %}
        <br />
        {% if accounts %}
          <div class="row text-center">
            <a href="{% url 'remove_social' request.user.username %}">
              <button class="btn btn-xs btn-danger">Disconnect Accounts</button>
            </a>
          </div>
        {% endif %}
134
135
136
137
138
      </div>
    </div>
  </div>

  <div class="col-md-8">
139
140
141

    <div class="panel panel-default">
      <div class="panel-heading">
142
        <h1 class="panel-title text-center"><strong>Student Settings</strong></h1>
143
144
145
      </div>

      <div class="panel-body">
146
147
148
149
150
151
        <p class="text-center">Off-campus locations along with a select number of locations <a href="{% url 'list_buildings'%}#Unsupported">on campus</a> aren't currently supported. You are still welcome to use Roomlist as a limited directory until we add support.</p>
        <p class="text-center">
          If you have a <a href="https://en.gravatar.com/">Gravatar profile</a> associated
          with your <a href="https://masonlive.gmu.edu/">Masonlive email</a> address, your
          default profile picture on this service will that Gravatar profile picture.
        </p>
152
        {% spaceless %}
153
        <form class="form-horizontal" autocomplete="off" action="" method="post">{% csrf_token %}
Daniel W Bond's avatar
Daniel W Bond committed
154

155
          {{ my_form.as_p }}
Daniel W Bond's avatar
Daniel W Bond committed
156

157
158
          <input type="submit" value="Save" class="btn btn-primary"/>
        </form>
159
        {% endspaceless %}
160
161
162
163
164
165
      </div>
    </div>

  </div>
</div>

166
{% endcache %}
Daniel W Bond's avatar
Daniel W Bond committed
167
168
169
170
171
172
173
174
175
176
{% endblock content %}

{% block javascript %}
  <script type="text/javascript" src="/static/js/jquery.chained.min.js"></script>
  <script>
    $("#building").chained("#neighborhood");
    $("#floor").chained("#building");
    $("#room").chained("#floor");
  </script>
{% endblock javascript %}