diff options
-rw-r--r-- | includes/pages/guest_login.php | 2 | ||||
-rw-r--r-- | includes/sys_template.php | 8 |
2 files changed, 9 insertions, 1 deletions
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 @@ -269,6 +269,14 @@ function form_text($name, $label, $value, $disabled = false) { } /** + * Rendert ein Formular-Emailfeld + */ +function form_email($name, $label, $value, $disabled = false) { + $disabled = $disabled ? ' disabled="disabled"' : ''; + return form_element($label, '<input class="form-control" id="form_' . $name . '" type="email" name="' . $name . '" value="' . htmlspecialchars($value) . '" ' . $disabled . '/>', 'form_' . $name); +} + +/** * Rendert ein Formular-Dateifeld */ function form_file($name, $label) { |