fixes #81: shirt size is now mandatory

fixes #50: login error to the top
This commit is contained in:
Philip Häusler 2012-12-01 11:39:03 +01:00
parent ddbc5a9db2
commit 781a996b3b
2 changed files with 182 additions and 179 deletions

View File

@ -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")),

View File

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