2016-07-29 19:31:36 +00:00
|
|
|
{% extends 'settings/advanced/master.twig' %}
|
|
|
|
|
|
|
|
{% set mode = 'Deactivate' %}
|
|
|
|
|
|
|
|
{% block description %}
|
2016-09-22 20:14:28 +00:00
|
|
|
<p>You can deactivate your account here if you want to leave.</p>
|
|
|
|
<p>This will remove your account from every rank it's a part of.</p>
|
2016-07-29 19:31:36 +00:00
|
|
|
<p>If you have an active Tenshi tag on your account it won't pause while your account is deactivated.</p>
|
2016-09-22 20:14:28 +00:00
|
|
|
<p>You can reactivate your account by logging in within 30 days, after that period your account will be removed.</p>
|
2016-07-29 19:31:36 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
2016-12-08 20:43:36 +00:00
|
|
|
{% block js %}
|
|
|
|
<script>
|
|
|
|
function yuunoDeactivate(form) {
|
|
|
|
var confirm = new Sakura.Dialogue;
|
|
|
|
confirm.SetType(Sakura.DialogueType.Confirm);
|
|
|
|
confirm.Text = "Are you really sure? You can reactivate your account within 30 days of deactivated, after that it'll be permanently deleted!";
|
|
|
|
|
|
|
|
confirm.AddCallback(Sakura.DialogueButton.No, function () {
|
|
|
|
this.Close();
|
|
|
|
});
|
|
|
|
|
|
|
|
confirm.AddCallback(Sakura.DialogueButton.Yes, function () {
|
|
|
|
var ajax = new Sakura.AJAX;
|
|
|
|
|
|
|
|
ajax.SetUrl("{{ route('settings.advanced.deactivate') }}");
|
|
|
|
ajax.SetFormData(new FormData(form));
|
|
|
|
|
|
|
|
ajax.AddCallback(200, function () {
|
|
|
|
var result = ajax.JSON();
|
|
|
|
confirm.Close();
|
|
|
|
|
|
|
|
if (result.error) {
|
|
|
|
var error = new Sakura.Dialogue;
|
|
|
|
error.Text = result.error;
|
|
|
|
error.SetType(Sakura.DialogueType.Info);
|
|
|
|
|
|
|
|
error.AddCallback(Sakura.DialogueButton.Ok, function () {
|
|
|
|
this.Close();
|
|
|
|
|
|
|
|
if (result.go) {
|
|
|
|
window.location.assign(result.go);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
error.Display();
|
|
|
|
} else {
|
|
|
|
window.location.reload();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
ajax.Start(Sakura.HTTPMethod.POST);
|
|
|
|
});
|
|
|
|
|
|
|
|
confirm.Display();
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|
|
|
|
|
2016-07-29 19:31:36 +00:00
|
|
|
{% block settingsContent %}
|
2016-12-08 20:43:36 +00:00
|
|
|
<form enctype="multipart/form-data" method="post" action="javascript:void(0);" onsubmit="yuunoDeactivate(this)">
|
|
|
|
<input type="hidden" name="session" value="{{ session_id() }}">
|
2016-07-29 19:31:36 +00:00
|
|
|
<div class="profile-field">
|
|
|
|
<div><h2>Enter your password to continue</h2></div>
|
2016-11-09 18:32:23 +00:00
|
|
|
<div><input type="password" name="password" class="input__text"></div>
|
2016-07-29 19:31:36 +00:00
|
|
|
</div>
|
2016-11-10 22:32:45 +00:00
|
|
|
<div style="text-align: center; margin: 2em;">
|
2016-12-08 20:43:36 +00:00
|
|
|
<button class="input__button input__button--danger">I understand, deactivate my account</button>
|
2016-07-29 19:31:36 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{% endblock %}
|