mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-14 04:04:03 +00:00
change view if just one confirmed openid or confirmed emailaccount
This commit is contained in:
@@ -97,52 +97,101 @@
|
|||||||
<h3>{% trans 'You have the following confirmed identities:' %}</h3>
|
<h3>{% trans 'You have the following confirmed identities:' %}</h3>
|
||||||
<div class="row profileid">
|
<div class="row profileid">
|
||||||
{% for email in user.confirmedemail_set.all %}
|
{% for email in user.confirmedemail_set.all %}
|
||||||
<form action="{% url 'remove_confirmed_email' email.id %}" method="post">
|
{% if user.confirmedemail_set.all|length == 1%}
|
||||||
{% csrf_token %}
|
<form action="{% url 'remove_confirmed_email' email.id %}" method="post">
|
||||||
<div id="email-conf-{{ forloop.counter }}" class="profile-container" onclick="add_active('email-conf-{{ forloop.counter }}')">
|
{% csrf_token %}
|
||||||
<img title="{% trans 'Access count' %}: {{ email.access_count }}" src="{% if email.photo %}{% url 'raw_image' email.photo.id %}{% else %}{% static '/img/nobody/120.png' %}{% endif %}">
|
<div id="email-conf-{{ forloop.counter }}" class="profile-container active">
|
||||||
<h3 class="panel-title email-profile" title="{{ email.email }}">
|
<img title="{% trans 'Access count' %}: {{ email.access_count }}" src="{% if email.photo %}{% url 'raw_image' email.photo.id %}{% else %}{% static '/img/nobody/120.png' %}{% endif %}">
|
||||||
{{ email.email }}
|
<h3 class="panel-title email-profile" title="{{ email.email }}">
|
||||||
|
{{ email.email }}
|
||||||
|
</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'assign_photo_email' email.id %}">
|
||||||
|
Change Profile Picture
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="email-delete">
|
||||||
|
<button type="submit" class="nobutton" onclick="return confirm('{% trans 'Are you sure that you want to delete this email address?' %}')">
|
||||||
|
Delete Email Adress
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
{% else %}
|
||||||
|
<form action="{% url 'remove_confirmed_email' email.id %}" method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
<div id="email-conf-{{ forloop.counter }}" class="profile-container" onclick="add_active('email-conf-{{ forloop.counter }}')">
|
||||||
|
<img title="{% trans 'Access count' %}: {{ email.access_count }}" src="{% if email.photo %}{% url 'raw_image' email.photo.id %}{% else %}{% static '/img/nobody/120.png' %}{% endif %}">
|
||||||
|
<h3 class="panel-title email-profile" title="{{ email.email }}">
|
||||||
|
{{ email.email }}
|
||||||
|
</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'assign_photo_email' email.id %}">
|
||||||
|
Change Profile Picture
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="email-delete">
|
||||||
|
<button type="submit" class="nobutton" onclick="return confirm('{% trans 'Are you sure that you want to delete this email address?' %}')">
|
||||||
|
Delete Email Adress
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% for openid in user.confirmedopenid_set.all %}
|
||||||
|
{% if user.confirmedopenid_set.all|length == 1 %}
|
||||||
|
<form action="{% url 'remove_confirmed_openid' openid.id %}" method="post">{% csrf_token %}
|
||||||
|
<div>
|
||||||
|
<div id="id-conf-{{ forloop.counter }}" class="profile-container active">
|
||||||
|
<img title="{% trans 'Access count' %}: {{ openid.access_count }}" src="{% if openid.photo %}{% url 'raw_image' openid.photo.id %}{% else %}{% static '/img/nobody/120.png' %}{% endif %}">
|
||||||
|
<h3 class="panel-title email-profile" title="{{ openid.openid }}">
|
||||||
|
{{ openid.openid }}
|
||||||
</h3>
|
</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url 'assign_photo_email' email.id %}">
|
<a href="{% url 'assign_photo_openid' openid.pk %}">
|
||||||
Change Profile Picture
|
Change OpenID Picture
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="email-delete">
|
<li>
|
||||||
<button type="submit" class="nobutton" onclick="return confirm('{% trans 'Are you sure that you want to delete this email address?' %}')">
|
<button type="submit" class="nobutton" onclick="return confirm('{% trans 'Are you sure that you want to delete this OpenID?' %}')">
|
||||||
Delete Email Adress
|
Delete OpenID
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
{% else %}
|
||||||
|
<form action="{% url 'remove_confirmed_openid' openid.id %}" method="post">{% csrf_token %}
|
||||||
|
<div>
|
||||||
|
<div id="id-conf-{{ forloop.counter }}" class="profile-container" onclick="add_active('id-conf-{{ forloop.counter }}')">
|
||||||
|
<img title="{% trans 'Access count' %}: {{ openid.access_count }}" src="{% if openid.photo %}{% url 'raw_image' openid.photo.id %}{% else %}{% static '/img/nobody/120.png' %}{% endif %}">
|
||||||
|
<h3 class="panel-title email-profile" title="{{ openid.openid }}">
|
||||||
|
{{ openid.openid }}
|
||||||
|
</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'assign_photo_openid' openid.pk %}">
|
||||||
|
Change OpenID Picture
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<button type="submit" class="nobutton" onclick="return confirm('{% trans 'Are you sure that you want to delete this OpenID?' %}')">
|
||||||
|
Delete OpenID
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for openid in user.confirmedopenid_set.all %}
|
|
||||||
<form action="{% url 'remove_confirmed_openid' openid.id %}" method="post">{% csrf_token %}
|
|
||||||
<div>
|
|
||||||
<div id="id-conf-{{ forloop.counter }}" class="profile-container" onclick="add_active('id-conf-{{ forloop.counter }}')">
|
|
||||||
<img title="{% trans 'Access count' %}: {{ openid.access_count }}" src="{% if openid.photo %}{% url 'raw_image' openid.photo.id %}{% else %}{% static '/img/nobody/120.png' %}{% endif %}">
|
|
||||||
<h3 class="panel-title email-profile" title="{{ openid.openid }}">
|
|
||||||
{{ openid.openid }}
|
|
||||||
</h3>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a href="{% url 'assign_photo_openid' openid.pk %}">
|
|
||||||
Change OpenID Picture
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<button type="submit" class="nobutton" onclick="return confirm('{% trans 'Are you sure that you want to delete this OpenID?' %}')">
|
|
||||||
Delete OpenID
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user