updateStudent.html 5.06 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
9
{% endblock %}

{% block content %}

10
11
{% include 'room_change_warning.html' %}

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

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

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

<br />

{% load socialaccount %} {% providers_media_js %}

32
33
{% get_social_accounts request.user as accounts %}

34
35
36
37
38
39
40
41
42
43
44
<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 %}
45
46
47
48
49
          <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' %}">
50
51
52
            <h4><i class="fa fa-facebook fa-2x"></i></h4>
            <h4>Facebook</h4>
          </a>
53
          {% endif %}
54
55
56
57
          </div>
          <div class="col-md-6">
          {% if accounts.google %}
            <p><i class="fa fa-check-square-o"></i> Verified!</p>
58
59
60
61
            <h4><i class="fa fa-google fa-2x"></i></h4>
            <h4>Google</h4>
          {% else %}
          <a href="{% provider_login_url 'google' process='connect' %}">
62
63
64
            <h4><i class="fa fa-google fa-2x"></i></h4>
            <h4>Google</h4>
          </a>
65
          {% endif %}
66
67
68
69
70
71
72
          </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>
73
74
75
76
            <h4><i class="fa fa-twitter fa-2x"></i></h4>
            <h4>Twitter</h4>
          {% else %}
          <a href="{% provider_login_url 'twitter' process='connect' %}">
77
78
79
            <h4><i class="fa fa-twitter fa-2x"></i></h4>
            <h4>Twitter</h4>
          </a>
80
          {% endif %}
81
82
83
84
          </div>
          <div class="col-md-6">
          {% if accounts.instagram %}
            <p><i class="fa fa-check-square-o"></i> Verified!</p>
85
86
87
88
            <h4><i class="fa fa-instagram fa-2x"></i></h4>
            <h4>Instagram</h4>
          {% else %}
          <a href="{% provider_login_url 'instagram' process='connect' %}">
89
90
91
            <h4><i class="fa fa-instagram fa-2x"></i></h4>
            <h4>Instagram</h4>
          </a>
92
          {% endif %}
93
94
          </div>
        </div>
95
96
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
        {% 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 %}
132
133
134
135
136
      </div>
    </div>
  </div>

  <div class="col-md-8">
137
138
139

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

      <div class="panel-body">
144
        <form class="form-horizontal" autocomplete="off" action="" method="post">{% csrf_token %}
Daniel W Bond's avatar
Daniel W Bond committed
145

146
          {{ my_form.as_p }}
Daniel W Bond's avatar
Daniel W Bond committed
147

148
149
150
151
152
153
154
155
156
          <input type="submit" value="Save" class="btn btn-primary"/>
        </form>
      </div>
    </div>

  </div>
</div>


Daniel W Bond's avatar
Daniel W Bond committed
157
158
159
160
161
162
163
164
165
166
{% 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 %}