Use tables headline for account.create.html.twig

This commit is contained in:
slawkens 2024-04-14 15:06:43 +02:00
parent e1f507cf2d
commit 64387e085b

View File

@ -1,24 +1,8 @@
{{ hook('HOOK_ACCOUNT_CREATE_BEFORE_FORM') }} {{ hook('HOOK_ACCOUNT_CREATE_BEFORE_FORM') }}
<form action="{{ getLink('account/create') }}" method="post" id="createaccount"> {% set title = 'Create ' ~ config.lua.serverName ~ ' Account' %}
{{ csrf() }} {% set background = config('darkborder') %}
<div class="TableContainer" > {% set tableClass = 'Table5' %}
<table class="Table5" cellpadding="0" cellspacing="0" > {% set content %}
<div class="CaptionContainer" >
<div class="CaptionInnerContainer" >
<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span>
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);" /></span>
<div class="Text" >Create {{ config.lua.serverName }} Account</div>
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);" /></span>
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);" ></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);" /></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer" >
<table style="width:100%;" > <table style="width:100%;" >
{{ hook('HOOK_ACCOUNT_CREATE_BEFORE_BOXES') }} {{ hook('HOOK_ACCOUNT_CREATE_BEFORE_BOXES') }}
<tr> <tr>
@ -40,7 +24,7 @@
{% endif %} {% endif %}
</td> </td>
<td> <td>
<input type="text" name="account" id="account_input" size="30" maxlength="{% if constant('USE_ACCOUNT_NAME') %}30{% else %}10{% endif %}" value="{{ account }}" autofocus/> <input form="form" type="text" name="account" id="account_input" size="30" maxlength="{% if constant('USE_ACCOUNT_NAME') %}30{% else %}10{% endif %}" value="{{ account }}" autofocus/>
<img id="account_indicator" src="images/global/general/{% if not save or errors.account is defined %}n{% endif %}ok.gif" style="display: none;" /> <img id="account_indicator" src="images/global/general/{% if not save or errors.account is defined %}n{% endif %}ok.gif" style="display: none;" />
</td> </td>
</tr> </tr>
@ -52,7 +36,7 @@
<span{% if errors.email is defined %} class="red"{% endif %}>Email Address:</span> <span{% if errors.email is defined %} class="red"{% endif %}>Email Address:</span>
</td> </td>
<td> <td>
<input type="text" name="email" id="email" size="30" maxlength="50" value="{{ email }}" /> <input form="form" type="text" name="email" id="email" size="30" maxlength="50" value="{{ email }}" />
<img id="email_indicator" src="images/global/general/{% if not save or errors.email is defined %}n{% endif %}ok.gif" style="display: none;" /> <img id="email_indicator" src="images/global/general/{% if not save or errors.email is defined %}n{% endif %}ok.gif" style="display: none;" />
</td> </td>
</tr> </tr>
@ -72,7 +56,7 @@
<span{% if errors.country[0] is defined %} class="red"{% endif %}>Country:</span> <span{% if errors.country[0] is defined %} class="red"{% endif %}>Country:</span>
</td> </td>
<td> <td>
<select name="country" id="account_country"> <select form="form" name="country" id="account_country">
{% for code, country_ in countries %} {% for code, country_ in countries %}
<option value="{{ code }}"{% if(country is defined and country == code) or (country is null and country_recognized == code) %}selected{% endif %}>{{ country_ }}</option> <option value="{{ code }}"{% if(country is defined and country == code) or (country is null and country_recognized == code) %}selected{% endif %}>{{ country_ }}</option>
{% endfor %} {% endfor %}
@ -92,7 +76,7 @@
<span{% if errors.password is defined %} class="red"{% endif %}>Password:</span> <span{% if errors.password is defined %} class="red"{% endif %}>Password:</span>
</td> </td>
<td> <td>
<input type="password" name="password" id="password" value="" size="30" maxlength="29" /> <input form="form" type="password" name="password" id="password" value="" size="30" maxlength="29" />
<img id="password_indicator" src="images/global/general/{% if not save or errors.password is defined %}n{% endif %}ok.gif" style="display: none;" /> <img id="password_indicator" src="images/global/general/{% if not save or errors.password is defined %}n{% endif %}ok.gif" style="display: none;" />
</td> </td>
</tr> </tr>
@ -105,7 +89,7 @@
<span{% if errors.password is defined %} class="red"{% endif %}>Repeat password:</span> <span{% if errors.password is defined %} class="red"{% endif %}>Repeat password:</span>
</td> </td>
<td> <td>
<input type="password" name="password_confirm" id="password_confirm" value="" size="30" maxlength="29" /> <input form="form" type="password" name="password_confirm" id="password_confirm" value="" size="30" maxlength="29" />
<img id="password_confirm_indicator" src="images/global/general/{% if not save or errors.password is defined %}n{% endif %}ok.gif" style="display: none;" /> <img id="password_confirm_indicator" src="images/global/general/{% if not save or errors.password is defined %}n{% endif %}ok.gif" style="display: none;" />
</td> </td>
</tr> </tr>
@ -141,7 +125,7 @@
<span{% if errors.name is defined %} class="red"{% endif %}>Character Name:</span> <span{% if errors.name is defined %} class="red"{% endif %}>Character Name:</span>
</td> </td>
<td> <td>
<input id="character_name" name="name" size="{{ setting('core.create_character_name_max_length') }}" maxlength="{{ setting('core.create_character_name_max_length') }}" value="{{ name }}"/> <input form="form" id="character_name" name="name" size="{{ setting('core.create_character_name_max_length') }}" maxlength="{{ setting('core.create_character_name_max_length') }}" value="{{ name }}"/>
<img id="character_indicator" src="images/global/general/{% if not save or errors.name is defined %}n{% endif %}ok.gif" style="display: none;" /> <img id="character_indicator" src="images/global/general/{% if not save or errors.name is defined %}n{% endif %}ok.gif" style="display: none;" />
<br> <br>
</td> </td>
@ -168,7 +152,7 @@
{% for id, gender in config.genders|reverse(true) %} {% for id, gender in config.genders|reverse(true) %}
{% set i = i + 1 %} {% set i = i + 1 %}
<span style="margin-right:15px;" class="OptionContainer"> <span style="margin-right:15px;" class="OptionContainer">
<input type="radio" name="sex" id="sex{{ i }}" value="{{ id }}"{% if sex is not null and sex == id %} checked="checked"{% endif %}> <input form="form" type="radio" name="sex" id="sex{{ i }}" value="{{ id }}"{% if sex is not null and sex == id %} checked="checked"{% endif %}>
<label for="sex{{ i }}">{{ gender|lower }}</label> <label for="sex{{ i }}">{{ gender|lower }}</label>
</span> </span>
{% endfor %} {% endfor %}
@ -201,7 +185,7 @@
<td> <td>
{% for key, sample_char in config.character_samples %} {% for key, sample_char in config.character_samples %}
<span style="margin-right:15px;" class="OptionContainer"> <span style="margin-right:15px;" class="OptionContainer">
<input type="radio" name="vocation" id="vocation{{ key }}" value="{{ key }}" <input form="form" type="radio" name="vocation" id="vocation{{ key }}" value="{{ key }}"
{% if vocation is not null and vocation == key %} checked="checked"{% endif %}> {% if vocation is not null and vocation == key %} checked="checked"{% endif %}>
<label for="vocation{{ key }}">{{ config['vocations'][key] }}</label> <label for="vocation{{ key }}">{{ config['vocations'][key] }}</label>
</span> </span>
@ -234,7 +218,7 @@
<td> <td>
{% for town_id in config.character_towns %} {% for town_id in config.character_towns %}
<span style="margin-right:15px;" class="OptionContainer"> <span style="margin-right:15px;" class="OptionContainer">
<input type="radio" name="town" id="town{{ town_id }}" value="{{ town_id }}" <input form="form" type="radio" name="town" id="town{{ town_id }}" value="{{ town_id }}"
{% if town is not null and town == town_id %} checked="checked"{% endif %}> {% if town is not null and town == town_id %} checked="checked"{% endif %}>
<label for="town{{ town_id }}">{{ config.towns[town_id] }}</label> <label for="town{{ town_id }}">{{ config.towns[town_id] }}</label>
</span> </span>
@ -279,7 +263,7 @@
</tr> </tr>
<tr> <tr>
<td colspan="2" > <td colspan="2" >
<span><input type="checkbox" id="accept_rules" name="accept_rules" value="true"{% if accept_rules %}checked{% endif %}/> <label for="accept_rules">I agree to the <a href="?subtopic=rules" target="_blank">{{ config.lua.serverName }} Rules</a>.</label></span> <span><input form="form" type="checkbox" id="accept_rules" name="accept_rules" value="true"{% if accept_rules %}checked{% endif %}/> <label for="accept_rules">I agree to the <a href="?subtopic=rules" target="_blank">{{ config.lua.serverName }} Rules</a>.</label></span>
</td> </td>
</tr> </tr>
{% if errors.accept_rules is defined %} {% if errors.accept_rules is defined %}
@ -303,11 +287,8 @@
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_BOXES') }} {{ hook('HOOK_ACCOUNT_CREATE_AFTER_BOXES') }}
</table> </table>
</div> {% endset %}
</td> {% include 'tables.headline.html.twig' %}
</tr>
</table>
</div>
<br/> <br/>
{{ hook('HOOK_ACCOUNT_CREATE_BEFORE_SUBMIT_BUTTON') }} {{ hook('HOOK_ACCOUNT_CREATE_BEFORE_SUBMIT_BUTTON') }}
<table width="100%"> <table width="100%">
@ -316,15 +297,17 @@
<table border="0" cellspacing="0" cellpadding="0" > <table border="0" cellspacing="0" cellpadding="0" >
<tr> <tr>
<td style="border:0px;" > <td style="border:0px;" >
<form id="form" action="{{ getLink('account/create') }}" method="post" id="createaccount">
{{ csrf() }}
<input type="hidden" name="save" value="1" > <input type="hidden" name="save" value="1" >
{{ include('buttons.submit.html.twig') }} {{ include('buttons.submit.html.twig') }}
</td>
</tr>
</table>
</td>
</tr>
</table>
</form> </form>
</td>
</tr>
</table>
</td>
</tr>
</table>
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_FORM') }} {{ hook('HOOK_ACCOUNT_CREATE_AFTER_FORM') }}
<script type="text/javascript" src="{{ constant('BASE_URL') }}tools/check_name.js"></script> <script type="text/javascript" src="{{ constant('BASE_URL') }}tools/check_name.js"></script>
<style> <style>