add a tar pid to the registration form
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 3 Nov 2019 16:05:06 +0000 (17:05 +0100)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 3 Nov 2019 16:05:06 +0000 (17:05 +0100)
src/Module/Register.php
view/templates/register.tpl
view/theme/frio/templates/register.tpl

index 03f9dbb..4071020 100644 (file)
@@ -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']);
 
index 456fada..bbfdffa 100644 (file)
@@ -56,6 +56,7 @@
 
 {{if $permonly}}
     {{include file="field_textarea.tpl" field=$permonlybox}}
+       <input type="input" id="registertarpid" style="display: none;" value="Don't enter anything here" />
 {{/if}}
 
        {{$publish nofilter}}
index 4819c5e..7dd802f 100644 (file)
@@ -56,6 +56,7 @@
 
                {{if $permonly}}
                {{include file="field_textarea.tpl" field=$permonlybox}}
+               <input type="input" id="registertarpid" style="display: none;" value="Don't enter anything here"/>
                {{/if}}
 
                {{$publish nofilter}}