fix(profile): only show banner to seniors

This commit is contained in:
Ethan Nguyen 2023-04-10 23:02:34 -05:00
parent 64e71aaa0c
commit 5b2cd98ae5
No known key found for this signature in database
GPG Key ID: B4CA5339AF911920

View File

@ -9,14 +9,14 @@
{% else %} {% else %}
<p id="without-nickname">You are {{ request.user.username }}, {{ request.user.first_name }} {{ request.user.last_name }}.</p> <p id="without-nickname">You are {{ request.user.username }}, {{ request.user.first_name }} {{ request.user.last_name }}.</p>
{% endif %} {% endif %}
{% if not request.user.publish_data %}
<div class="alert alert-warning" role="alert">
Your profile is currently hidden. You can publish your profile by marking the "publish my data" checkbox and submit this form.
</div>
{% endif %}
<h4>Personal Information, Data Publication, College Attending, Biography</h4> <h4>Personal Information, Data Publication, College Attending, Biography</h4>
<div class="container"> <div class="container">
{% if request.user.is_senior %} {% if request.user.is_senior %}
{% if not request.user.publish_data %}
<div class="alert alert-warning" role="alert">
Your profile is currently hidden. You can publish your profile by marking the "publish my data" checkbox and submit this form.
</div>
{% endif %}
{% crispy profile_form %} {% crispy profile_form %}
{% else %} {% else %}
<p>You are not a senior, so you cannot publish data.</p> <p>You are not a senior, so you cannot publish data.</p>