misc
This commit is contained in:
parent
fc34d4d4c3
commit
64100805fd
7 changed files with 48 additions and 67 deletions
|
@ -70,10 +70,6 @@ class AdvancedController extends Controller
|
||||||
*/
|
*/
|
||||||
public function deactivate()
|
public function deactivate()
|
||||||
{
|
{
|
||||||
if (CurrentSession::$user->permission(Site::DEACTIVATED)) {
|
|
||||||
return view('settings/advanced/deactivate_bye');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!CurrentSession::$user->permission(Site::DEACTIVATE_ACCOUNT)) {
|
if (!CurrentSession::$user->permission(Site::DEACTIVATE_ACCOUNT)) {
|
||||||
throw new HttpMethodNotAllowedException();
|
throw new HttpMethodNotAllowedException();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,25 +6,6 @@
|
||||||
<p>Alter the details of your account, leave fields blank to leave them unchanged.</p>
|
<p>Alter the details of your account, leave fields blank to leave them unchanged.</p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block js %}
|
|
||||||
{{ parent() }}
|
|
||||||
<script>
|
|
||||||
function updateSettingsConfirm(form, action) {
|
|
||||||
var dialogue = new Sakura.Dialogue;
|
|
||||||
dialogue.Text = "Are you sure?";
|
|
||||||
dialogue.SetType(Sakura.DialogueType.Confirm);
|
|
||||||
dialogue.AddCallback(Sakura.DialogueButton.No, function () {
|
|
||||||
this.Close();
|
|
||||||
});
|
|
||||||
dialogue.AddCallback(Sakura.DialogueButton.Yes, function () {
|
|
||||||
updateSettings(form, action);
|
|
||||||
this.Close();
|
|
||||||
});
|
|
||||||
dialogue.Display();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block settingsContent %}
|
{% block settingsContent %}
|
||||||
<form enctype="multipart/form-data" method="post" action="javascript:;" onsubmit="updateSettingsConfirm(this, '{{ route('settings.account.details') }}');">
|
<form enctype="multipart/form-data" method="post" action="javascript:;" onsubmit="updateSettingsConfirm(this, '{{ route('settings.account.details') }}');">
|
||||||
{% if edit_email %}
|
{% if edit_email %}
|
||||||
|
|
|
@ -1,33 +1,3 @@
|
||||||
{% extends 'settings/master.twig' %}
|
{% extends 'settings/master.twig' %}
|
||||||
|
|
||||||
{% set category = 'Account' %}
|
{% set category = 'Account' %}
|
||||||
|
|
||||||
{% block js %}
|
|
||||||
<script>
|
|
||||||
function updateSettings(form, action) {
|
|
||||||
var forms = {},
|
|
||||||
dialogue = new Sakura.Dialogue,
|
|
||||||
updater = new Sakura.AJAX;
|
|
||||||
|
|
||||||
dialogue.AddCallback(Sakura.DialogueButton.Ok, function () {
|
|
||||||
this.Close();
|
|
||||||
});
|
|
||||||
|
|
||||||
for (var a = 0; a < form.elements.length; a++) {
|
|
||||||
forms[form.elements.item(a).name] = form.elements.item(a).value;
|
|
||||||
}
|
|
||||||
|
|
||||||
updater.SetUrl(action);
|
|
||||||
updater.Form();
|
|
||||||
updater.SetSend(forms);
|
|
||||||
updater.AddCallback(0, function () {
|
|
||||||
var resp = updater.JSON();
|
|
||||||
dialogue.Text = resp.error || 'Updated!';
|
|
||||||
dialogue.Display();
|
|
||||||
});
|
|
||||||
updater.Start(Sakura.HTTPMethod.POST);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
|
@ -3,9 +3,10 @@
|
||||||
{% set mode = 'Deactivate' %}
|
{% set mode = 'Deactivate' %}
|
||||||
|
|
||||||
{% block description %}
|
{% block description %}
|
||||||
<p>You can deactivate your account here if you want to leave :(.</p>
|
<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 and make you unable to login.</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>
|
<p>If you have an active Tenshi tag on your account it won't pause while your account is deactivated.</p>
|
||||||
|
<p>You can reactivate your account by logging in within 30 days, after that period your account will be removed.</p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block settingsContent %}
|
{% block settingsContent %}
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
{% extends 'master.twig' %}
|
|
||||||
|
|
||||||
{% set title = 'Farewell!' %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<div class="content standalone" style="text-align: center;">
|
|
||||||
<h1 class="stylised" style="margin: 1em auto;">Farewell!</h1>
|
|
||||||
<h1 class="fa fa-frown-o stylised" style="font-size: 20em;"></h1>
|
|
||||||
<h3>Remember that you can reactivate your account anytime if you decide to come back!</h3>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
|
@ -2,6 +2,50 @@
|
||||||
|
|
||||||
{% set title = category ~ ' / ' ~ mode %}
|
{% set title = category ~ ' / ' ~ mode %}
|
||||||
|
|
||||||
|
{% block js %}
|
||||||
|
<script>
|
||||||
|
function updateSettings(form, action, text) {
|
||||||
|
var forms = {},
|
||||||
|
dialogue = new Sakura.Dialogue,
|
||||||
|
updater = new Sakura.AJAX;
|
||||||
|
|
||||||
|
dialogue.AddCallback(Sakura.DialogueButton.Ok, function () {
|
||||||
|
this.Close();
|
||||||
|
});
|
||||||
|
|
||||||
|
for (var a = 0; a < form.elements.length; a++) {
|
||||||
|
forms[form.elements.item(a).name] = form.elements.item(a).value;
|
||||||
|
}
|
||||||
|
|
||||||
|
updater.SetUrl(action);
|
||||||
|
updater.Form();
|
||||||
|
updater.SetSend(forms);
|
||||||
|
updater.AddCallback(0, function () {
|
||||||
|
var resp = updater.JSON();
|
||||||
|
dialogue.Text = resp.error || text || 'Updated!';
|
||||||
|
dialogue.Display();
|
||||||
|
});
|
||||||
|
updater.Start(Sakura.HTTPMethod.POST);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateSettingsConfirm(form, action) {
|
||||||
|
var dialogue = new Sakura.Dialogue;
|
||||||
|
dialogue.Text = "Are you sure?";
|
||||||
|
dialogue.SetType(Sakura.DialogueType.Confirm);
|
||||||
|
dialogue.AddCallback(Sakura.DialogueButton.No, function () {
|
||||||
|
this.Close();
|
||||||
|
});
|
||||||
|
dialogue.AddCallback(Sakura.DialogueButton.Yes, function () {
|
||||||
|
updateSettings(form, action);
|
||||||
|
this.Close();
|
||||||
|
});
|
||||||
|
dialogue.Display();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="content settings messages {% if showBG %}background-transparent{% endif %}">
|
<div class="content settings messages {% if showBG %}background-transparent{% endif %}">
|
||||||
<div class="content-right content-column">
|
<div class="content-right content-column">
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
window.addEventListener('load', function () {
|
window.addEventListener('load', function () {
|
||||||
{% if profile.lastfm %}
|
{% if profile.lastfm %}
|
||||||
var np = new Sakura.AJAX();
|
var np = new Sakura.AJAX();
|
||||||
np.SetUrl("{{ route('user.nowplaying', user.id) }}");
|
np.SetUrl("{{ route('user.nowplaying', profile.id) }}");
|
||||||
np.AddCallback(200, function () {
|
np.AddCallback(200, function () {
|
||||||
var data = np.JSON(),
|
var data = np.JSON(),
|
||||||
artist = Sakura.DOM.ID('np-artist'),
|
artist = Sakura.DOM.ID('np-artist'),
|
||||||
|
|
Reference in a new issue