diff options
author | msquare <msquare@notrademark.de> | 2015-08-16 23:13:05 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2015-08-16 23:13:05 +0200 |
commit | 9d7389baeb1d3aaf427f65a373c1909d5e7b5340 (patch) | |
tree | 7b33efdbb60807d5bb462d30e0847c64ea639228 | |
parent | a7189482e92556c33b5a320989faa97be98c82bc (diff) | |
parent | a67237d0ef1a1697a99180ae99bd64cc05c40d30 (diff) |
Merge pull request #210 from engelsystem/fix-register-form
Fix register form
-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) { |