Skip to content

Commit b5a9410

Browse files
committed
Style remove account section
1 parent c18c56c commit b5a9410

File tree

1 file changed

+45
-26
lines changed

1 file changed

+45
-26
lines changed

warehouse/templates/manage/profile.html

Lines changed: 45 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -248,33 +248,52 @@ <h2>Change Password</h2>
248248
</div>
249249
</form>
250250

251-
<h2>Delete account</h2>
252-
{% if active_projects %}
253-
<p>
254-
Your account is currently the sole owner of these projects:
255-
</p>
256-
<ul>
257-
{% for project in active_projects %}
258-
<li>
259-
<a href="{{ request.route_path('manage.project.settings', project_name=project.name) }}">
260-
{{ project.name }}
251+
<hr>
252+
253+
<h2>Delete Account</h2>
254+
<div class="callout-block">
255+
{% if active_projects %}
256+
<h3>Cannot Delete Account</h3>
257+
<p>
258+
Your account is currently the <strong>sole owner</strong> of {{ active_projects|length }}
259+
{% trans count=active_projects|length %}
260+
project.
261+
{% pluralize %}
262+
projects.
263+
{% endtrans %}
264+
You must transfer ownership or delete
265+
{% trans count=active_projects|length %}
266+
this project
267+
{% pluralize %}
268+
these projects
269+
{% endtrans %}
270+
before you can delete your account.
271+
</p>
272+
<ul class="no-bottom-margin">
273+
{% for project in active_projects %}
274+
<li>
275+
<strong>{{ project.name }}</strong> -
276+
<a href="{{ request.route_path('manage.project.roles', project_name=project.name) }}">
277+
transfer ownership
278+
</a>
279+
or
280+
<a href="{{ request.route_path('manage.project.settings', project_name=project.name) }}">
281+
delete
282+
</a>
283+
</li>
284+
{% endfor %}
285+
</ul>
286+
{% else %}
287+
<h3>Proceed with caution!</h3>
288+
<p>You will not be able to recover your account after you delete it.</p>
289+
<form>
290+
<a href="#delete-account-modal" class="button button--primary">
291+
Delete Account
261292
</a>
262-
</li>
263-
{% endfor %}
264-
</ul>
265-
<p>
266-
You must transfer ownership or delete these projects before you can delete your account.
267-
</p>
268-
{% endif %}
269-
<form>
270-
<a
271-
href="#delete-account-modal"
272-
class="button button--primary"
273-
{{ 'disabled' if active_projects else '' }}
274-
>
275-
Delete your account
276-
</a>
277-
</form>
293+
</form>
294+
{% endif %}
295+
</div>
296+
278297
<div id="delete-account-modal" class="modal">
279298
<div class="modal__content" role="dialog">
280299
<form method="POST" action="{{ request.current_route_path() }}" class="modal__form">

0 commit comments

Comments
 (0)