From a1bcb217ecf4e21fd58da4ba491da1852029898a Mon Sep 17 00:00:00 2001 From: slawkens Date: Thu, 30 May 2024 17:36:07 +0200 Subject: [PATCH] Fixes regarding not working google recaptcha (+few previous commits) --- system/pages/account/base.php | 3 +- system/templates/account.create.html.twig | 539 +++++++++++----------- 2 files changed, 264 insertions(+), 278 deletions(-) diff --git a/system/pages/account/base.php b/system/pages/account/base.php index 75b1cc7711..3676d7c44a 100644 --- a/system/pages/account/base.php +++ b/system/pages/account/base.php @@ -19,7 +19,8 @@ 'redirect' => $_REQUEST['redirect'] ?? null, 'account' => USE_ACCOUNT_NAME ? 'Name' : 'Number', 'account_login_by' => getAccountLoginByLabel(), - 'error' => $errors[0] ?? null + 'error' => $errors[0] ?? null, + 'errors' => $errors ?? [], )); return; diff --git a/system/templates/account.create.html.twig b/system/templates/account.create.html.twig index 7611a0c298..300b700ae3 100644 --- a/system/templates/account.create.html.twig +++ b/system/templates/account.create.html.twig @@ -1,313 +1,298 @@ {{ hook('HOOK_ACCOUNT_CREATE_BEFORE_FORM') }}
{{ csrf() }} -
- -
-
- - - - -
Create {{ config.lua.serverName }} Account
- - - - -
-
+ + {% set title = 'Create ' ~ config.lua.serverName ~ ' Account' %} + {% set background = config('darkborder') %} + {% set tableClass = 'Table5' %} + {% set content %} +
+ {{ hook('HOOK_ACCOUNT_CREATE_BEFORE_BOXES') }} + + {% endif %} - {{ hook('HOOK_ACCOUNT_CREATE_AFTER_BOXES') }} + {{ hook('HOOK_ACCOUNT_CREATE_BETWEEN_BOXES_2') }} -
-
- - {{ hook('HOOK_ACCOUNT_CREATE_BEFORE_BOXES') }} - - - + {{ hook('HOOK_ACCOUNT_CREATE_AFTER_PASSWORD') }} - {{ hook('HOOK_ACCOUNT_CREATE_BETWEEN_BOXES_1') }} + + + + + - {% if (not setting('core.mail_enabled') or not setting('core.account_mail_verify')) and setting('core.account_create_character_create') %} - - + - {{ hook('HOOK_ACCOUNT_CREATE_BEFORE_CHARACTER_NAME') }} + {{ hook('HOOK_ACCOUNT_CREATE_BETWEEN_BOXES_1') }} - - - - - - - - + {% if (not setting('core.mail_enabled') or not setting('core.account_mail_verify')) and setting('core.account_create_character_create') %} + + - - {% endif %} + {% if config.character_towns|length > 1 %} + + + + + {% endif %} - {{ hook('HOOK_ACCOUNT_CREATE_BETWEEN_BOXES_2') }} + {{ hook('HOOK_ACCOUNT_CREATE_AFTER_TOWNS') }} - - - + +
-
-
-
- - - - {{ hook('HOOK_ACCOUNT_CREATE_BEFORE_ACCOUNT') }} - - {% if not config.account_login_by_email %} - - - - - {% endif %} - - {{ hook('HOOK_ACCOUNT_CREATE_AFTER_ACCOUNT') }} - - - - - - - +
+
+
+
- Account {% if constant('USE_ACCOUNT_NAME') %}Name{% else %}Number{% endif %}: - {% if not constant('USE_ACCOUNT_NAME') %} - - {% endif %} - - - -
{% if errors.account is defined %}{{ errors.account }}{% endif %}
- Email Address: - - - -
{% if errors.email is defined %}{{ errors.email }}{% endif %}
+ - {% if setting('core.mail_enabled') and setting('core.account_mail_verify') %} - - {% endif %} + {{ hook('HOOK_ACCOUNT_CREATE_BEFORE_ACCOUNT') }} - {{ hook('HOOK_ACCOUNT_CREATE_AFTER_EMAIL') }} + {% if not config.account_login_by_email %} + + + + + {% endif %} + + {{ hook('HOOK_ACCOUNT_CREATE_AFTER_ACCOUNT') }} + + + + + + + - {% if setting('core.account_country') %} - - - - - {% if errors.country is defined %} - - {% endif %} - {% endif %} + {% if setting('core.mail_enabled') and setting('core.account_mail_verify') %} + + {% endif %} - {{ hook('HOOK_ACCOUNT_CREATE_AFTER_COUNTRY') }} + {{ hook('HOOK_ACCOUNT_CREATE_AFTER_EMAIL') }} - - - - - + {% if setting('core.account_country') %} + + + + + {% if errors.country is defined %} + + {% endif %} + {% endif %} - {{ hook('HOOK_ACCOUNT_CREATE_AFTER_PASSWORD') }} + {{ hook('HOOK_ACCOUNT_CREATE_AFTER_COUNTRY') }} - - - - - + + + + + - {{ hook('HOOK_ACCOUNT_CREATE_AFTER_PASSWORDS') }} - -
Please use real address!
We will send a link to validate your Email.
+ Account {% if constant('USE_ACCOUNT_NAME') %}Name{% else %}Number{% endif %}: + {% if not constant('USE_ACCOUNT_NAME') %} + + {% endif %} + + + +
{% if errors.account is defined %}{{ errors.account }}{% endif %}
+ Email Address: + + + +
{% if errors.email is defined %}{{ errors.email }}{% endif %}
- Country: - - - -
{{ errors.country }}
Please use real address!
We will send a link to validate your Email.
- Password: - - - -
{% if errors.password is defined %}{{ errors.password }}{% endif %}
+ Country: + + + +
{{ errors.country }}
- Repeat password: - - - -
{% if errors.password is defined %}{{ errors.password }}{% endif %}
+ Password: + + + +
{% if errors.password is defined %}{{ errors.password }}{% endif %}
-
-
-
-
-
+ Repeat password: + + + +
{% if errors.password is defined %}{{ errors.password }}{% endif %}
-
-
-
-
-
- - + {{ hook('HOOK_ACCOUNT_CREATE_AFTER_PASSWORDS') }} + +
+
+
+
+
+
- Character Name: - - - -
-
- {% if errors.name is defined %}{{ errors.name }}{% endif %} -
+
+
+
+
+
+ + - {{ hook('HOOK_ACCOUNT_CREATE_AFTER_CHARACTER_NAME') }} + {{ hook('HOOK_ACCOUNT_CREATE_BEFORE_CHARACTER_NAME') }} - - - - - - - - + + + + + + + + - {{ hook('HOOK_ACCOUNT_CREATE_AFTER_SEX') }} + {{ hook('HOOK_ACCOUNT_CREATE_AFTER_CHARACTER_NAME') }} - {% if config.character_samples|length > 1 %} - - - - - - - - - {% endif %} + + + + + + + + - {{ hook('HOOK_ACCOUNT_CREATE_AFTER_VOCATION') }} + {{ hook('HOOK_ACCOUNT_CREATE_AFTER_SEX') }} - {% if config.character_towns|length > 1 %} - - - - - {% endif %} + {% if config.character_samples|length > 1 %} + + + + + + + + + {% endif %} - {{ hook('HOOK_ACCOUNT_CREATE_AFTER_TOWNS') }} + {{ hook('HOOK_ACCOUNT_CREATE_AFTER_VOCATION') }} - -
- Sex: - - - - - - - - -
- {% set i = 0 %} - {% for id, gender in config.genders|reverse(true) %} - {% set i = i + 1 %} - - - - - {% endfor %} - -
-
- {% if errors.sex is defined %}{{ errors.sex }}{% endif %} -
+ Character Name: + + + +
+
+ {% if errors.name is defined %}{{ errors.name }}{% endif %} +
- Vocation: - - - - - - - -
- {% for key, sample_char in config.character_samples %} - - - - - {% endfor %} -
-
- {% if errors.vocation is defined %}{{ errors.vocation }}{% endif %} -
+ Sex: + + + + + + + + +
+ {% set i = 0 %} + {% for id, gender in config.genders|reverse(true) %} + {% set i = i + 1 %} + + + + + {% endfor %} + +
+
+ {% if errors.sex is defined %}{{ errors.sex }}{% endif %} +
- Select your town: - - - - - - - -
- {% for town_id in config.character_towns %} - - - - - {% endfor %} -
-
+ Vocation: + + + + + + + +
+ {% for key, sample_char in config.character_samples %} + + + + + {% endfor %} +
+
+ {% if errors.vocation is defined %}{{ errors.vocation }}{% endif %} +
-
-
-
-
-
-
-
-
-
+ Select your town: + + + + + + + +
+ {% for town_id in config.character_towns %} + + + + + {% endfor %} +
+
-
-
-
-
-
- - - - - - - - - {% if errors.accept_rules is defined %} - - - - {% endif %} - -
Please select the following check box:
- -
- {{ errors.accept_rules }} -
-
-
-
-
-
-
-
+
+ +
+
+
+
+
+
+
+ + +
+
+
+
+
+ + + + + + + + + {% if errors.accept_rules is defined %} + + + + {% endif %} + +
Please select the following check box:
+ +
+ {{ errors.accept_rules }} +
+
+
+
+
+
+ + {{ hook('HOOK_ACCOUNT_CREATE_AFTER_BOXES') }} + -
+ {% endset %} + {% include 'tables.headline.html.twig' %} +
{{ hook('HOOK_ACCOUNT_CREATE_BEFORE_SUBMIT_BUTTON') }}