[WIP] Refactor account/lost

This commit is contained in:
slawkens
2025-09-14 17:41:53 +02:00
parent e27d974c46
commit 25695a039d
26 changed files with 294 additions and 265 deletions

View File

@@ -1,23 +0,0 @@
New password to your account is below. Now you can login.<BR>
<table cellspacing="1" cellpadding="4" border="0" width="100%">
<tr>
<td bgcolor="{{ config('vdarkborder') }}" class="white"><b>Changed password</b></td>
</tr>
<tr>
<td bgcolor="{{ config('darkborder') }}">
New password:&nbsp;<b>{{ newPassword }}</b><br/>
Account name:&nbsp;&nbsp;&nbsp;<i>(Already on your e-mail)</i><br/>
{{ statusMsg|raw }}
</td>
</tr>
</table>
<br/>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td align="center">
<form action="{{ getlink('account/manage') }}" method="post">
{{ include('buttons.submit.html.twig') }}
</form>
</td>
</tr>
</table>

View File

@@ -1,36 +0,0 @@
The Lost Account Interface can help you to get back your account name and password. Please enter your character name and select what you want to do.<br/>
<form action="{{ getLink('account/lost') }}?action=step1" method="post">
{{ csrf() }}
<input type="hidden" name="character" value="">
<table cellspacing="1" cellpadding="4" border="0" width="100%">
<tr>
<td bgcolor="{{ config.vdarkborder }}" class="white"><b>Please enter your character name</b></td>
</tr>
<tr>
<td bgcolor="{{ config.darkborder }}">
<input type="text" name="nick" size="40" autofocus/><br>
</td>
</tr>
</table>
<table cellspacing="1" cellpadding="4" border="0" width="100%">
<tr>
<td bgcolor="{{ config.vdarkborder }}" class="white"><b>What do you want?</b></td>
</tr>
<tr>
<td bgcolor="{{ config.darkborder }}">
<input type="radio" name="action_type" id="action_type_email" value="email">
<label for="action_type_email"> Send me new password and my account name to account e-mail adress.</label><br/>
<input type=radio name="action_type" id="action_type_key" value="reckey">
<label for="action_type_key"> I got <b>recovery key</b> and want set new password and e-mail adress to my account.</label><br/>
</td>
</tr>
</table>
<br/>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td align="center">
{{ include('buttons.submit.html.twig') }}
</td>
</tr>
</table>
</form>

View File

@@ -1,10 +0,0 @@
Please select action.<br/>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td align="center">
<a href="{{ getLink('account/lost') }}" border="0">
{{ include('buttons.back.html.twig') }}
</a>
</td>
</tr>
</table>

View File

@@ -1,23 +0,0 @@
Please enter e-mail to account with this character.<br/>
<form action="{{ getLink('account/lost') }}?action=send-code" method="post">
<input type=hidden name="character">
<table cellspacing=1 cellpadding=4 border=0 width=100%>
<tr>
<td bgcolor="{{ config('vdarkborder') }}" class="white"><b>Please enter e-mail to account</b></td>
</tr>
<tr>
<td bgcolor="{{ config('darkborder') }}">
Character: <input type=text name="nick" value="{{ nick }}" size="40" readonly="readonly"><br/>
E-mail to account: <input type=text name="email" value="" size="40"><br/>
</td>
</tr>
</table>
<br>
<table cellspacing=0 cellpadding=0 border=0 width=100%>
<tr>
<td><div style="text-align:center">
{{ include('buttons.submit.html.twig') }}</div>
</TD>
</TR>
</table>
</form>

View File

@@ -0,0 +1,26 @@
Please enter new password to your account and repeat to make sure you remember password.<BR>
<form action="{{ getLink('account/lost/email/set-new-password') }}" method="post">
<input type="hidden" name="character" value="{{ character }}">
<input type="hidden" name="code" value="{{ code }}">
<table style="width: 100%; border-spacing: 1px">
<tr>
<td style="padding: 4px; background: {{ config('vdarkborder') }}" class="white"><B>Passwords</B></td></tr>
<TR>
<td style="padding: 4px; background: {{ config('darkborder') }}">
New password:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="password" ID="passor" name="passor" value="" size="40"><br/>
Repeat new password:&nbsp;<input TYPE="password" ID="passor2" name="passor2" value="" size="40"><br/>
</td>
</TR>
</table>
<br/>
<table style="width: 100%">
<tr>
<td>
<div style="text-align: center">
{% set button_name = 'Submit' %}
{% include('buttons.base.html.twig') %}
</div>
</td>
</tr>
</table>
</form>

View File

@@ -1,23 +1,24 @@
Please enter code from e-mail and name of one character from account. Then press Submit.<br/>
<form action="{{ getLink('account/lost') }}?action=check-code" method="post">
<table cellspacing="1" cellpadding="4" border="0" width="100%">
<form action="{{ getLink('account/lost/check-code') }}" method="post">
<table style="width: 100%; border-spacing: 1px">
<tr>
<td bgcolor="{{ config('vdarkborder') }}" class="white">
<td style="padding: 4px; background: {{ config('vdarkborder') }}" class="white">
<b>Code & character name</b>
</td>
</tr>
<tr>
<td bgcolor="{{ config('darkborder') }}">
<td style="padding: 4px; background: {{ config('darkborder') }}">
Your code:&nbsp;<input type="text" name="code" value="{{ code }}" size="40"><br/>
Character:&nbsp;<input type="text" name="character" value="{{ character }}" size="40"><br/>
</td>
</tr>
</table>
<br>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<table style="width: 100%">
<tr>
<td align="center">
{{ include('buttons.submit.html.twig') }}
{% set button_name = 'Submit' %}
{% include('buttons.base.html.twig') %}
</td>
</tr>
</table>

View File

@@ -0,0 +1,26 @@
Please enter e-mail to account with this character.<br/>
<form action="{{ getLink('account/lost/email/send-code') }}" method="post">
<input type=hidden name="character">
<table style="width: 100%; border-spacing: 1px">
<tr>
<td style="padding: 4px; background: {{ config('vdarkborder') }}" class="white"><b>Please enter e-mail to account</b></td>
</tr>
<tr>
<td style="padding: 4px; background: {{ config('darkborder') }}">
Character: <input type=text name="nick" value="{{ nick }}" size="40" readonly="readonly"><br/>
E-mail to account: <input type=text name="email" value="" size="40"><br/>
</td>
</tr>
</table>
<br>
<table style="width: 100%">
<tr>
<td>
<div style="text-align:center">
{% set button_name = 'Submit' %}
{% include('buttons.base.html.twig') %}
</div>
</td>
</tr>
</table>
</form>

View File

@@ -1,12 +1,12 @@
Your account name, new password and new e-mail.<br/>
<table cellspacing="1" cellpadding="4" border="0" width="100%">
<table style="width: 100%; border-spacing: 1px">
<tr>
<td bgcolor="{{ config('vdarkborder') }}" class="white">
<td style="padding: 4px; background: {{ config('vdarkborder') }}" class="white">
<b>Your account name, new password and new e-mail</b>
</td>
</tr>
<tr>
<td bgcolor="{{ config('darkborder') }}">
<td style="padding: 4px; background: {{ config('darkborder') }}">
Account name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>{{ account.getName() }}</b><br/>
New password:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>{{ newPassword }}</b><br/>
New e-mail address:&nbsp;<b>{{ newEmail }}</b><br/>
@@ -15,7 +15,7 @@ Your account name, new password and new e-mail.<br/>
</tr>
</table>
<br>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<table style="width: 100%">
<tr>
<td align="center">
<form action="{{ getLink('account/manage') }}" method="post">

View File

@@ -0,0 +1,24 @@
New password to your account is below. Now you can log in.<BR>
<table style="width: 100%; border-spacing: 1px">
<tr>
<td style="padding: 4px; background: {{ config('vdarkborder') }}" class="white"><b>Changed password</b></td>
</tr>
<tr>
<td style="padding: 4px; background: {{ config('darkborder') }}">
New password:&nbsp;<b>{{ newPassword }}</b><br/>
Account name:&nbsp;&nbsp;&nbsp;<i>(Already on your e-mail)</i><br/>
{{ statusMsg|raw }}
</td>
</tr>
</table>
<br/>
<table style="width: 100%">
<tr>
<td align="center">
<form action="{{ getLink('account/manage') }}">
{% set button_name = 'Login' %}
{% include('buttons.base.html.twig') %}
</form>
</td>
</tr>
</table>

View File

@@ -0,0 +1,37 @@
The Lost Account Interface can help you to get back your account name and password. Please enter your character name and select what you want to do.<br/>
<form action="{{ getLink('account/lost/step-1') }}" method="post">
{{ csrf() }}
<input type="hidden" name="character" value="">
<table style="width: 100%; border-spacing: 1px">
<tr>
<td style="padding: 4px; background: {{ config('vdarkborder') }}" class="white"><b>Please enter your character name</b></td>
</tr>
<tr>
<td style="padding: 4px; background: {{ config('darkborder') }}">
<input type="text" name="nick" size="40" autofocus/><br>
</td>
</tr>
</table>
<table style="width: 100%; border-spacing: 1px">
<tr>
<td style="padding: 4px; background: {{ config('vdarkborder') }}" class="white"><b>What do you want?</b></td>
</tr>
<tr>
<td style="padding: 4px; background: {{ config('darkborder') }}">
<input type="radio" name="action" id="action_type_email" value="email">
<label for="action_type_email"> Send me new password and my account name to account e-mail address.</label><br/>
<input type=radio name="action" id="action_type_key" value="recovery-key">
<label for="action_type_key"> I got <b>recovery key</b> and want set new password and e-mail address to my account.</label><br/>
</td>
</tr>
</table>
<br/>
<table style="width: 100%">
<tr>
<td align="center">
{% set button_name = 'Submit' %}
{% include('buttons.base.html.twig') %}
</td>
</tr>
</table>
</form>

View File

@@ -0,0 +1,10 @@
Please select action.<br/>
<table style="width: 100%">
<tr>
<td align="center">
<a href="{{ getLink('account/lost') }}">
{{ include('buttons.back.html.twig') }}
</a>
</td>
</tr>
</table>

View File

@@ -0,0 +1,27 @@
If you enter right recovery key you will see form to set new e-mail and password to account. To this e-mail will be send your new password and account name.<BR>
<form action="{{ getLink('account/lost/recovery-key/step-2') }}" method="post">
<table style="width: 100%; border-spacing: 1px">
<tr>
<td style="padding: 4px; background: {{ config('vdarkborder') }}" class="white">
<b>Please enter your recovery key</b>
</td>
</tr>
<tr>
<td style="padding: 4px; background: {{ config('darkborder') }}">
Character name:&nbsp;<input type=text name="nick" value="{{ nick }}" size="40" readonly="readonly"><br/>
Recovery key:&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="key" value="" size="40"><br/>
</td>
</tr>
</table>
<br>
<table style="width: 100%">
<tr>
<td>
<div style="text-align:center">
{% set button_name = 'Submit' %}
{% include('buttons.base.html.twig') %}
</div>
</td>
</tr>
</table>
</form>

View File

@@ -1,26 +1,28 @@
Set new password and e-mail to your account.<br>
<form action="{{ getLink('account/lost') }}?action=step3" method="post">
<form action="{{ getLink('account/lost/step-3') }}" method="post">
<input type="hidden" name="character" value="">
<table cellspacing="1" cellpadding="4" border="0" width="100%">
<table cellspacing="1" width="100%">
<tr>
<td bgcolor="{{ config('vdarkborder') }}" class="white">
<td style="padding: 4px; background: {{ config('vdarkborder') }}" class="white">
<b>Please enter new password and e-mail</b>
</td>
</tr>
<tr>
<td bgcolor="{{ config('darkborder') }}">
<td style="padding: 4px; background: {{ config('darkborder') }}">
Account of character:&nbsp;&nbsp;<input type="text" name="nick" value="{{ nick }}" size="40" readonly="readonly"><br/>
New password:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input id="passor" type="password" name="passor" value="" size="40"><br/>
Repeat new password:&nbsp;&nbsp;<input id="passor2" type="password" name="passor" value="" size="40"><br/>
New e-mail address:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input id="email" type="text" name="email" value="" size="40"><br/>
<input type=hidden name="key" VALUE="{{ recKey }}">
</td></tr>
<input type="hidden" name="key" VALUE="{{ recKey }}">
</td>
</tr>
</table>
<br>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<table style="width: 100%">
<tr>
<td align="center">
{{ include('buttons.submit.html.twig') }}
{% set button_name = 'Submit' %}
{% include('buttons.base.html.twig') %}
</td>
</tr>
</table>

View File

@@ -3,8 +3,8 @@ You asked to reset your {{ config('lua')['serverName'] }} password.<br/>
<br/>
To do so, please click this link:
<p>
<a href="{{ getLink('account/lost') }}?action=check-code&code={{ newCode }}&character={{ nick|urlencode }}">{{ getLink('account/lost') }}?action=check-code&code={{ newCode }}&character={{ nick|urlencode }}</a>
<a href="{{ getLink('account/lost/check-code') }}?code={{ newCode }}&character={{ nick|urlencode }}">{{ getLink('account/lost/check-code') }}?code={{ newCode }}&character={{ nick|urlencode }}</a>
</p>
<p>or open page: <i>{{ getLink('account/lost') }}?action=check-code</i> and in field "code" write <b>{{ newCode }}</b></p>
<p>or open page: <i>{{ getLink('account/lost/check-code') }}</i> and in field "code" write <b>{{ newCode }}</b></p>
<br/>
<p>If you did not request a password change, you may ignore this message and your password will remain unchanged.

View File

@@ -1,5 +1,5 @@
<h3>Your account name and password!</h3>
<p>Changed password to your account in Lost Account Interface on server <a href="{{ constant('BASE_URL') }}"><b>config('lua')['serverName'] }}</b></a></p>
<p>Changed password to your account in Lost Account Interface on server <a href="{{ constant('BASE_URL') }}"><b>{{ config('lua')['serverName'] }}</b></a></p>
<p>Account name: <b>{{ account.getName() }}</b></p>
<p>New password: <b>{{ newPassword }}</b></p>
<br/>