This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/resources/views/yuuno/settings/advanced/deactivate.twig

72 lines
2.7 KiB
Twig
Raw Normal View History

{% 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>
<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>
{% endblock %}
{% 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 %}
{% block settingsContent %}
<form enctype="multipart/form-data" method="post" action="javascript:void(0);" onsubmit="yuunoDeactivate(this)">
<input type="hidden" name="session" value="{{ session_id() }}">
<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>
</div>
2016-11-10 22:32:45 +00:00
<div style="text-align: center; margin: 2em;">
<button class="input__button input__button--danger">I understand, deactivate my account</button>
</div>
</form>
{% endblock %}