From b3aa6cc473d180699f5395015daa5b01f2a9aa4d Mon Sep 17 00:00:00 2001 From: gnomus Date: Sun, 16 Aug 2015 20:38:41 +0200 Subject: [PATCH 1/3] Change Register form E-Mailfield to form_email --- includes/pages/guest_login.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) )) )), From 7306545e321fcdd308b14939b8d368bb25fa424b Mon Sep 17 00:00:00 2001 From: gnomus Date: Sun, 16 Aug 2015 20:41:23 +0200 Subject: [PATCH 2/3] Add Email Form Helper --- includes/sys_template.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/includes/sys_template.php b/includes/sys_template.php index d3f7a24e..3b6d7d3b 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -225,6 +225,14 @@ function form_text($name, $label, $value, $disabled = false) { return form_element($label, '', 'form_' . $name); } +/** + * Rendert ein Formular-Emailfeld + */ +function form_text($name, $label, $value, $disabled = false) { + $disabled = $disabled ? ' disabled="disabled"' : ''; + return form_element($label, '', 'form_' . $name); +} + /** * Rendert ein Formular-Dateifeld */ From a67237d0ef1a1697a99180ae99bd64cc05c40d30 Mon Sep 17 00:00:00 2001 From: gnomus Date: Sun, 16 Aug 2015 21:05:27 +0200 Subject: [PATCH 3/3] Named Function Correctly --- includes/sys_template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/sys_template.php b/includes/sys_template.php index dd5edde7..6beaa57a 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -271,7 +271,7 @@ function form_text($name, $label, $value, $disabled = false) { /** * Rendert ein Formular-Emailfeld */ -function form_text($name, $label, $value, $disabled = false) { +function form_email($name, $label, $value, $disabled = false) { $disabled = $disabled ? ' disabled="disabled"' : ''; return form_element($label, '', 'form_' . $name); }