app/views/user/settings.volt: adding "Delete account" button.
This commit is contained in:
parent
aea09efddb
commit
6ce456fff7
1 changed files with 38 additions and 0 deletions
|
|
@ -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">×</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>
|
||||
|
||||
|
||||
|
|
|
|||
Reference in a new issue