Commit d0c51abe authored by BAIRE Anthony's avatar BAIRE Anthony

list ToS agreements on the user profile page

parent e6805e9a
......@@ -822,6 +822,10 @@ class UserUpdate(LoginRequiredMixin, SuccessMessageMixin, UpdateView):
kwargs['ssh_fingerprint'] = fingerprint
if token:
kwargs['token'] = token
kwargs['agreements'] = UserAgreement.objects.filter(
user=self.request.user).order_by("-created_at")
return super(UserUpdate, self).get_context_data(**kwargs)
......
......@@ -111,7 +111,7 @@
</div>
<div class="clearfix mb-3 pb-3">
<div class="clearfix border-bottom mb-3 pb-3">
<h5>Token</h5>
<p>
......@@ -134,10 +134,22 @@
</div>
</div>
</div>
</div>
</div>
{% if agreements %}
<div class="clearfix mb-3 pb-3">
<h5>Terms of Service</h5>
<p>You agreed to the following Terms of Service:
<ul>
{% for agreement in agreements %}
<li><a href="{{agreement.tos.url}}">Version {{agreement.tos.version}}</a> <i>agreed on {{agreement.created_at}}</i></li>
{% endfor %}
</ul>
</p>
</div>
{% endif %}
</div>
</div>
{% endblock %}
......
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