From a3588869e82df191183b151e7bcf68f34b1359a8 Mon Sep 17 00:00:00 2001 From: james Date: Wed, 15 Dec 2004 20:29:38 +0000 Subject: [PATCH] Add a division selector popup that asks questions to determine what division they should be in. It also updates the original form based on the outcome (but needs the FIXME addressed evnetually) --- register_participants_project.php | 18 +++- ..._participants_project_divisionselector.php | 97 +++++++++++++++++++ sfiab.css | 5 + 3 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 register_participants_project_divisionselector.php diff --git a/register_participants_project.php b/register_participants_project.php index 4edd988..5a6f9d4 100644 --- a/register_participants_project.php +++ b/register_participants_project.php @@ -123,7 +123,7 @@ else if($newstatus=="complete") - echo "
\n"; + echo "\n"; echo "\n"; echo "id\">\n"; echo "\n"; @@ -143,6 +143,22 @@ else if($newstatus=="complete") } echo ""; + if($config['usedivisionselector']=="yes") + { + ?> + + ".i18n("Division Selector").""; + } echo ""; echo "
".i18n("Language").": "; diff --git a/register_participants_project_divisionselector.php b/register_participants_project_divisionselector.php new file mode 100644 index 0000000..b902171 --- /dev/null +++ b/register_participants_project_divisionselector.php @@ -0,0 +1,97 @@ + + + +<?=i18n("Division Selector")?> + + + +"; + + if($_GET['division']) + { + //FIXME: this only works when the division form uses ID's in order or their index AND the ID's are sequential starting from 1 + ?> + + ".i18n($r->division)."\n"; + echo "Restart Division Selector"; + echo "
"; + echo "
"; + echo "Close window\n"; + + } + else + { + if(!$_GET['id']) + $id=1; + else + $id=$_GET['id']; + $q=mysql_query("SELECT * FROM projectdivisionsselector WHERE id='$id'"); + $r=mysql_fetch_object($q); + echo i18n($r->question); + echo "
"; + echo "
"; + echo ""; + echo "
"; + echo "\n"; + if($r->no_type=="question") + echo "no\">\n"; + if($r->no_type=="division") + echo "no\">\n"; + echo ""; + echo "\n"; + echo ""; + echo " "; + echo "
\n"; + if($r->yes_type=="question") + echo "yes\">\n"; + if($r->yes_type=="division") + echo "yes\">\n"; + echo ""; + echo "
\n"; + echo "
"; + + } + echo ""; + +?> + + diff --git a/sfiab.css b/sfiab.css index e4f125e..91d4e41 100644 --- a/sfiab.css +++ b/sfiab.css @@ -66,6 +66,11 @@ td { } +#emptypopup { + padding: 30px; + text-align: center; +} + h1 { font-size: 24px; font-weight: bold;