Merge pull request #210 from engelsystem/fix-register-form

Fix register form
main
msquare 9 years ago
commit 9d7389baeb

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

@ -268,6 +268,14 @@ function form_text($name, $label, $value, $disabled = false) {
return form_element($label, '<input class="form-control" id="form_' . $name . '" type="text" name="' . $name . '" value="' . htmlspecialchars($value) . '" ' . $disabled . '/>', 'form_' . $name);
}
/**
* 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
*/

Loading…
Cancel
Save