diff --git a/registration-system/index.php b/registration-system/index.php index eb524e149737bf85c4efec2afb79d99156875bb2..42253dab95959004d9de067c07890f1e7403b6d7 100644 --- a/registration-system/index.php +++ b/registration-system/index.php @@ -260,13 +260,30 @@ function index_show_formular($fid, $bid = NULL, $bachelor = NULL){ { return [ END; - $dates = comm_get_possible_dates(); + $dates = comm_get_possible_dates($index_db, $fid); foreach($dates as &$date) $date = '"'.$date.'"'; echo implode(', ', $dates); echo<<<END ]; } + function config_get_travel_types() + { + return { +END; + $first = true; + global $config_reisearten_o; + foreach($config_reisearten_o as $key => $value) + { + if ($first) + $first = false; + else + echo ', '; + echo '"'.$key.'":"'.$value.'"'; + } + echo<<<END + }; + } </script> </div> <div style="text-align:center;font-weight:bold"><a style="float:none;margin:0 auto;" diff --git a/registration-system/view/js/story.js b/registration-system/view/js/story.js index 8d4c50dc77fdfbc7184427f595a2b6483d2fe524..458a78eea56b200d2525865482189e2bb1d7c15a 100644 --- a/registration-system/view/js/story.js +++ b/registration-system/view/js/story.js @@ -694,6 +694,17 @@ function storySubmit() below: "Ja" }; + var travelMapPhp = config_get_travel_types(); + travelMap = { + car: + "AUTO", + oeffi: + "BUSBAHN", + bike: + "RAD", + camel: + "INDIVIDUELL" + }; formAppendText('forname', story.form_variables.forname); formAppendText('sirname', story.form_variables.name); @@ -703,9 +714,9 @@ function storySubmit() formAppendText('virgin', ageMap[story.form_variables.age] || ''); formAppendText('essen', eatMap[story.form_variables.eat] || ''); formAppendText('anday', story.form_variables.travelStartDate); - formAppendText('antyp', story.form_variables.travelStartType); + formAppendText('antyp', travelMapPhp[travelMap[story.form_variables.travelStartType]]); formAppendText('abday', story.form_variables.travelEndDate); - formAppendText('abtyp', story.form_variables.travelEndType); + formAppendText('abtyp', travelMapPhp[travelMap[story.form_variables.travelEndType]]); formAppendText('comment', 'This form was created with VisualPotato3D'); // ? // formAppendText('public', ''); // ? // form.append('<input type="submit" name="submit" />');