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,25 +1,9 @@
{{ hook('HOOK_ACCOUNT_CREATE_BEFORE_FORM') }}
<form action="{{ getLink('account/create') }}" method="post" id="createaccount">
{{ csrf() }}
<div class="TableContainer" >
<table class="Table5" cellpadding="0" cellspacing="0" >
<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%;" >
{% set title = 'Create ' ~ config.lua.serverName ~ ' Account' %}
{% set background = config('darkborder') %}
{% set tableClass = 'Table5' %}
{% set content %}
<table style="width:100%;" >
{{ hook('HOOK_ACCOUNT_CREATE_BEFORE_BOXES') }}
<tr>
<td>
@ -40,7 +24,7 @@
{% endif %}
</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;" />
</td>
</tr>
@ -52,7 +36,7 @@
<span{% if errors.email is defined %} class="red"{% endif %}>Email Address:</span>
</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;" />
</td>
</tr>
@ -72,7 +56,7 @@
<span{% if errors.country[0] is defined %} class="red"{% endif %}>Country:</span>
</td>
<td>
<select name="country" id="account_country">
<select form="form" name="country" id="account_country">
{% 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>
{% endfor %}
@ -92,7 +76,7 @@
<span{% if errors.password is defined %} class="red"{% endif %}>Password:</span>
</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;" />
</td>
</tr>
@ -105,7 +89,7 @@
<span{% if errors.password is defined %} class="red"{% endif %}>Repeat password:</span>
</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;" />
</td>
</tr>
@ -141,7 +125,7 @@
<span{% if errors.name is defined %} class="red"{% endif %}>Character Name:</span>
</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;" />
<br>
</td>
@ -168,7 +152,7 @@
{% for id, gender in config.genders|reverse(true) %}
{% set i = i + 1 %}
<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>
</span>
{% endfor %}
@ -201,7 +185,7 @@
<td>
{% for key, sample_char in config.character_samples %}
<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 %}>
<label for="vocation{{ key }}">{{ config['vocations'][key] }}</label>
</span>
@ -234,7 +218,7 @@
<td>
{% for town_id in config.character_towns %}
<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 %}>
<label for="town{{ town_id }}">{{ config.towns[town_id] }}</label>
</span>
@ -279,7 +263,7 @@
</tr>
<tr>
<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>
</tr>
{% if errors.accept_rules is defined %}
@ -302,29 +286,28 @@
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_BOXES') }}
</table>
</div>
</td>
</tr>
</table>
</div>
<br/>
{{ hook('HOOK_ACCOUNT_CREATE_BEFORE_SUBMIT_BUTTON') }}
<table width="100%">
</table>
{% endset %}
{% include 'tables.headline.html.twig' %}
<br/>
{{ hook('HOOK_ACCOUNT_CREATE_BEFORE_SUBMIT_BUTTON') }}
<table width="100%">
<tr align="center">
<td>
<table border="0" cellspacing="0" cellpadding="0" >
<tr>
<td style="border:0px;" >
<form id="form" action="{{ getLink('account/create') }}" method="post" id="createaccount">
{{ csrf() }}
<input type="hidden" name="save" value="1" >
{{ include('buttons.submit.html.twig') }}
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</table>
{{ hook('HOOK_ACCOUNT_CREATE_AFTER_FORM') }}
<script type="text/javascript" src="{{ constant('BASE_URL') }}tools/check_name.js"></script>
<style>