summaryrefslogtreecommitdiff
path: root/includes/pages/guest_login.php
diff options
context:
space:
mode:
authorJanne Heß <janne@hess.ooo>2019-04-23 12:42:01 +0200
committerJanne Heß <janne@hess.ooo>2019-04-23 12:43:45 +0200
commit665e444e881ec2ca4378b346d45dbc488ac89a2b (patch)
tree7831f2b56555863bf3b869c9162351508d4c4eb2 /includes/pages/guest_login.php
parent69c47dcc42da663b75b05b3878bd1d4071697d76 (diff)
Support disabling the DECT field
It's a really chaos-event-specific feature and is confusing for many people on non-chaos events.
Diffstat (limited to 'includes/pages/guest_login.php')
-rw-r--r--includes/pages/guest_login.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php
index c636a36c..2f206bcc 100644
--- a/includes/pages/guest_login.php
+++ b/includes/pages/guest_login.php
@@ -42,6 +42,7 @@ function guest_register()
$authUser = auth()->user();
$tshirt_sizes = config('tshirt_sizes');
$enable_tshirt_size = config('enable_tshirt_size');
+ $enable_dect = config('enable_dect');
$min_password_length = config('min_password_length');
$config = config();
$request = request();
@@ -167,7 +168,7 @@ function guest_register()
if ($request->has('prename')) {
$preName = strip_request_item('prename');
}
- if ($request->has('dect')) {
+ if ($enable_dect && $request->has('dect')) {
if (strlen(strip_request_item('dect')) <= 40) {
$dect = strip_request_item('dect');
} else {
@@ -339,10 +340,10 @@ function guest_register()
]),
div('col-md-6', [
div('row', [
- div('col-sm-4', [
+ $enable_dect ? div('col-sm-4', [
form_text('dect', __('DECT'), $dect)
- ]),
- div('col-sm-4', [
+ ]) : '',
+ div($enable_dect ? 'col-sm-4' : 'col-sm-12', [
form_text('mobile', __('Mobile'), $mobile)
]),
]),