Archived
1
0
Fork 0

app/views/user/settings.volt: adding "Delete account" button.

This commit is contained in:
Henrik Hautakoski 2018-08-10 17:47:53 +02:00
parent aea09efddb
commit 6ce456fff7
No known key found for this signature in database
GPG key ID: 839F3A7EAFAEAFAA

View file

@ -71,8 +71,46 @@
<div class="col-sm-offset-2 col-sm-10">
<hr />
{{ form.render('Save') }}
<button class="button button-danger pull-right" type="button" data-toggle="modal" data-target="#deleteModal">
Delete Account
</button>
</div>
</div>
</form>
</div>
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title pull-left" id="deleteModalLabel">Delete account</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<form method="post" action="/user/delete">
<div class="modal-body">
<p>
Deleting your account is a non-reversible action.
All data associated with your account will be lost in the process.
</p>
{% if user.password|length > 0 %}
<p>Enter your <kbd>password</kbd> to confirm:</p>
<input type="password" name="currentpw" class="form-control" />
{% endif %}
</div>
<div class="modal-footer">
<button type="button" class="button button-default" data-dismiss="modal">Close</button>
<input type="submit" name="deleteAcc" class="button button-danger" value="Delete account">
</div>
</form>
</div>
</div>
</div>