From 4a59a604fc00c58b521f136b6fbe1da32f5a9b1d Mon Sep 17 00:00:00 2001
From: Manuel Herrmann <it@icetruck.de>
Date: Tue, 23 Sep 2014 01:22:07 +0200
Subject: [PATCH] story errors direct to form

---
 registration-system/index.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/registration-system/index.php b/registration-system/index.php
index c74738a..f528179 100644
--- a/registration-system/index.php
+++ b/registration-system/index.php
@@ -204,7 +204,8 @@ function index_check_field($index, $check, &$datarr, &$errarr, $errmess){
 function index_show_formular($fid, $bid = NULL, $bachelor = NULL){
     global $index_db, $config_studitypen, $config_essen, $config_reisearten, $invalidCharsRegEx;
 
-	if (!isset($_GET['noscript']))
+	$withStoryMode = !isset($_GET['noscript']) && !isset($_REQUEST['submit']) && !isset($_REQUEST['storySubmit']);
+	if ($withStoryMode)
 		echo '<noscript>';
 
     $possible_dates = comm_get_possible_dates($index_db, $fid);
@@ -246,7 +247,7 @@ function index_show_formular($fid, $bid = NULL, $bachelor = NULL){
         <div class="spacer"></div>
         </form>
         </div>';
-	if (!isset($_GET['noscript']))
+	if ($withStoryMode)
 	{
 		echo '</noscript>';
 		echo '<h2>Anmeldeformular</h2>';
-- 
GitLab