From b6b93e10606aac7526880f402d59e0b4e235cb26 Mon Sep 17 00:00:00 2001 From: dave Date: Wed, 31 Jan 2007 07:30:43 +0000 Subject: [PATCH] - If the option to print the total registration fee is on, and there are pay-for t-shirts, completely remove the tshirt line if no tshirt is selected. It should cause less confusion - If the same conditions are true and a tshirt has been selected, inform the student how they can deselect it to not incur the cost of a tshirt with registration. --- register_participants_main.php | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/register_participants_main.php b/register_participants_main.php index ea62b49..9eb7d48 100644 --- a/register_participants_main.php +++ b/register_participants_main.php @@ -299,12 +299,13 @@ echo "
"; echo "
"; echo "

"; - function regfee_line($item, $unit, $qty, $tot) + function regfee_line($item, $unit, $qty, $tot, $extra) { echo "".i18n($item).""; echo "($".sprintf("%.02f", $unit).""; echo "* $qty)"; echo "$".sprintf("%.02f", $tot).""; + echo "".i18n($extra).""; echo ""; } if($config['regfee_show_info']) { @@ -322,23 +323,33 @@ echo "
"; echo ""; if($config['regfee_per'] == 'student') { $f = $config['regfee'] * $n_students; - regfee_line("Fair Registration (per student)", $config['regfee'], $n_students, $f); + regfee_line("Fair Registration (per student)", $config['regfee'], $n_students, $f, ''); $regfee += $f; } else { - regfee_line("Fair Registration (per project)", $config['regfee'], 1, $config['regfee']); + regfee_line("Fair Registration (per project)", $config['regfee'], 1, $config['regfee'], ''); $regfee += $config['regfee']; } + $extra_after = ""; if($config['participant_student_tshirt'] == 'yes') { $tsc = floatval($config['participant_student_tshirt_cost']); if($tsc != 0.0) { $f = $n_tshirts * $tsc; $regfee += $f; - regfee_line("T-Shirts", $tsc, $n_tshirts, $f); + + if($n_tshirts != 0) { + $ex = "*"; + $extra_after = "* If you do not wish to order a T-Shirt, please select your T-Shirt size as 'None' on the Student Information Page"; + regfee_line("T-Shirts", $tsc, $n_tshirts, $f, $ex); + } } } - echo ""; + echo ""; echo "
".i18n("Total (inlcuding all taxes)")."$".sprintf("%.02f", $regfee)."
".i18n("Total (including all taxes)")."$".sprintf("%.02f", $regfee)."

"; + echo i18n($extra_after); + echo "
"; + echo "
"; + echo "
"; } echo "

".i18n("Registration Instructions")."

";