From 7ca202baada95b69eea822e04fe89467c7ad74e2 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 3 Nov 2019 17:05:06 +0100 Subject: [PATCH 1/3] add a tar pid to the registration form --- src/Module/Register.php | 5 +++++ view/templates/register.tpl | 1 + view/theme/frio/templates/register.tpl | 1 + 3 files changed, 7 insertions(+) diff --git a/src/Module/Register.php b/src/Module/Register.php index 03f9dbb698..4071020e32 100644 --- a/src/Module/Register.php +++ b/src/Module/Register.php @@ -261,6 +261,11 @@ class Register extends BaseModule $a->internalRedirect('register/'); } + // Is there text in the tar pid? + if (!empty($_POST('registeertarpid'))) { + \notice(L10n::t('You have entered too much information.')); + $a->internalRedirect('register/'); + } Model\Register::createForApproval($user['uid'], Config::get('system', 'language'), $_POST['permonlybox']); diff --git a/view/templates/register.tpl b/view/templates/register.tpl index 456fadaab8..bbfdffa620 100644 --- a/view/templates/register.tpl +++ b/view/templates/register.tpl @@ -56,6 +56,7 @@ {{if $permonly}} {{include file="field_textarea.tpl" field=$permonlybox}} + {{/if}} {{$publish nofilter}} diff --git a/view/theme/frio/templates/register.tpl b/view/theme/frio/templates/register.tpl index 4819c5ee81..7dd802f5e0 100644 --- a/view/theme/frio/templates/register.tpl +++ b/view/theme/frio/templates/register.tpl @@ -56,6 +56,7 @@ {{if $permonly}} {{include file="field_textarea.tpl" field=$permonlybox}} + {{/if}} {{$publish nofilter}} From 0215ceeecda51e4610587d7fe8d32f371fc31743 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 3 Nov 2019 17:11:24 +0100 Subject: [PATCH 2/3] use placeholder --- view/templates/register.tpl | 2 +- view/theme/frio/templates/register.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/view/templates/register.tpl b/view/templates/register.tpl index bbfdffa620..609aa57719 100644 --- a/view/templates/register.tpl +++ b/view/templates/register.tpl @@ -56,7 +56,7 @@ {{if $permonly}} {{include file="field_textarea.tpl" field=$permonlybox}} - + {{/if}} {{$publish nofilter}} diff --git a/view/theme/frio/templates/register.tpl b/view/theme/frio/templates/register.tpl index 7dd802f5e0..1ad53aad6d 100644 --- a/view/theme/frio/templates/register.tpl +++ b/view/theme/frio/templates/register.tpl @@ -56,7 +56,7 @@ {{if $permonly}} {{include file="field_textarea.tpl" field=$permonlybox}} - + {{/if}} {{$publish nofilter}} From 1377d13055e6aeea37811e925455bdb17f98777e Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 3 Nov 2019 17:37:53 +0100 Subject: [PATCH 3/3] ypot --- src/Module/Register.php | 4 ++-- view/templates/register.tpl | 2 +- view/theme/frio/templates/register.tpl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Module/Register.php b/src/Module/Register.php index 4071020e32..0837b5706e 100644 --- a/src/Module/Register.php +++ b/src/Module/Register.php @@ -261,8 +261,8 @@ class Register extends BaseModule $a->internalRedirect('register/'); } - // Is there text in the tar pid? - if (!empty($_POST('registeertarpid'))) { + // Is there text in the tar pit? + if (!empty($_POST('registertarpit'))) { \notice(L10n::t('You have entered too much information.')); $a->internalRedirect('register/'); } diff --git a/view/templates/register.tpl b/view/templates/register.tpl index 609aa57719..7aa1a4d991 100644 --- a/view/templates/register.tpl +++ b/view/templates/register.tpl @@ -56,7 +56,7 @@ {{if $permonly}} {{include file="field_textarea.tpl" field=$permonlybox}} - + {{/if}} {{$publish nofilter}} diff --git a/view/theme/frio/templates/register.tpl b/view/theme/frio/templates/register.tpl index 1ad53aad6d..81e519ef75 100644 --- a/view/theme/frio/templates/register.tpl +++ b/view/theme/frio/templates/register.tpl @@ -56,7 +56,7 @@ {{if $permonly}} {{include file="field_textarea.tpl" field=$permonlybox}} - + {{/if}} {{$publish nofilter}}