fixes #81: shirt size is now mandatory

fixes #50: login error to the top
main
Philip Häusler 12 years ago
parent ddbc5a9db2
commit 781a996b3b

@ -18,7 +18,7 @@ function guest_register() {
$jabber = "";
$hometown = "";
$comment = "";
$tshirt_size = 'S';
$tshirt_size = '';
$password_hash = "";
$selected_angel_types = array ();
@ -63,10 +63,12 @@ function guest_register() {
}
if ($enable_tshirt_size) {
if (isset ($_REQUEST['tshirt_size']) && isset ($tshirt_sizes[$_REQUEST['tshirt_size']]))
if (isset ($_REQUEST['tshirt_size']) && isset ($tshirt_sizes[$_REQUEST['tshirt_size']]) && $_REQUEST['tshirt_size'] != '')
$tshirt_size = $_REQUEST['tshirt_size'];
else
else {
$ok = false;
$msg .= error("Please select your shirt size.", true);
}
}
if (isset ($_REQUEST['password']) && strlen($_REQUEST['password']) >= 6) {
@ -199,9 +201,9 @@ function guest_login() {
}
return page(array (
Get_Text("index_text1") . " " . Get_Text("index_text2") . " " . Get_Text("index_text3"),
$msg,
msg(),
Get_Text("index_text1") . " " . Get_Text("index_text2") . " " . Get_Text("index_text3"),
form(array (
form_text('nick', Get_Text("index_lang_nick"), $nick),
form_password('password', Get_Text("index_lang_pass")),

@ -5,6 +5,7 @@
* Available T-Shirt sizes
*/
$tshirt_sizes = array (
'' => "Please select...",
'S' => "S",
'M' => "M",
'L' => "L",

Loading…
Cancel
Save