diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php index 8556b455..677b057b 100644 --- a/includes/pages/guest_login.php +++ b/includes/pages/guest_login.php @@ -180,7 +180,7 @@ function guest_register() { form_text('nick', _("Nick") . ' ' . entry_required(), $nick) )), div('col-sm-8', array( - form_text('mail', _("E-Mail") . ' ' . entry_required(), $mail), + form_email('mail', _("E-Mail") . ' ' . entry_required(), $mail), form_checkbox('email_shiftinfo', _("Please send me an email if my shifts change"), $email_shiftinfo) )) )), diff --git a/includes/sys_template.php b/includes/sys_template.php index 001b1f37..6beaa57a 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -268,6 +268,14 @@ function form_text($name, $label, $value, $disabled = false) { return form_element($label, '', 'form_' . $name); } +/** + * Rendert ein Formular-Emailfeld + */ +function form_email($name, $label, $value, $disabled = false) { + $disabled = $disabled ? ' disabled="disabled"' : ''; + return form_element($label, '', 'form_' . $name); +} + /** * Rendert ein Formular-Dateifeld */