Log form validation errors to the console when running in debug mode
authorAlexander Ebert <ebert@woltlab.com>
Sun, 4 Oct 2020 10:54:32 +0000 (12:54 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 4 Oct 2020 10:54:32 +0000 (12:54 +0200)
Closes #3541

com.woltlab.wcf/templates/pageFooter.tpl

index f4aca1d74495460d275e3842894eca800df1bb75..c7062323ee057913a95905c42187133619403f5f 100644 (file)
@@ -8,6 +8,13 @@
                        errorType: {if $errorType|empty}(empty){else}{$errorType|print_r:true}{/if}
                
                -->
+               {if ENABLE_DEBUG_MODE}
+                       <script>
+                               console.debug('FORM_VALIDATION_FAILED');
+                               console.debug('errorField:', '{if $errorField|empty}(empty){else}{$errorField|json_encode}{/if}');
+                               console.debug('errorType:', '{if $errorType|empty}(empty){else}{$errorType|json_encode}{/if}');
+                       </script>
+               {/if}
        {/if}
        
        {assign var=__boxesFooter value=$__wcf->getBoxHandler()->getBoxes('footer')}