diff options
author | Christopher Smith <chris@jalakai.co.uk> | 2013-07-31 18:38:02 +0200 |
---|---|---|
committer | Christopher Smith <chris@jalakai.co.uk> | 2013-08-01 11:11:52 +0200 |
commit | ae2cab4f84b5ccada7ace4108c30376a6f6214d3 (patch) | |
tree | 13046a11167a22d9117f7d2fc5b76ee3540551b2 | |
parent | 3e7e02779454686e1c639eb366a195bd1ab50458 (diff) | |
download | rpg-ae2cab4f84b5ccada7ace4108c30376a6f6214d3.tar.gz rpg-ae2cab4f84b5ccada7ace4108c30376a6f6214d3.tar.bz2 |
add html5 attributes to register form
-rw-r--r-- | inc/html.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/inc/html.php b/inc/html.php index fb39fcb3c..d94291090 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1318,19 +1318,22 @@ function html_register(){ global $conf; global $INPUT; + $base_attrs = array('size'=>50,'required'=>'required'); + $email_attrs = $base_attrs + array('type'=>'email','class'=>'edit'); + print p_locale_xhtml('register'); print '<div class="centeralign">'.NL; $form = new Doku_Form(array('id' => 'dw__register')); $form->startFieldset($lang['btn_register']); $form->addHidden('do', 'register'); $form->addHidden('save', '1'); - $form->addElement(form_makeTextField('login', $INPUT->post->str('login'), $lang['user'], '', 'block', array('size'=>'50'))); + $form->addElement(form_makeTextField('login', $INPUT->post->str('login'), $lang['user'], '', 'block', $base_attrs)); if (!$conf['autopasswd']) { - $form->addElement(form_makePasswordField('pass', $lang['pass'], '', 'block', array('size'=>'50'))); - $form->addElement(form_makePasswordField('passchk', $lang['passchk'], '', 'block', array('size'=>'50'))); + $form->addElement(form_makePasswordField('pass', $lang['pass'], '', 'block', $base_attrs)); + $form->addElement(form_makePasswordField('passchk', $lang['passchk'], '', 'block', $base_attrs)); } - $form->addElement(form_makeTextField('fullname', $INPUT->post->str('fullname'), $lang['fullname'], '', 'block', array('size'=>'50'))); - $form->addElement(form_makeTextField('email', $INPUT->post->str('email'), $lang['email'], '', 'block', array('size'=>'50'))); + $form->addElement(form_makeTextField('fullname', $INPUT->post->str('fullname'), $lang['fullname'], '', 'block', $base_attrs)); + $form->addElement(form_makeField('email','email', $INPUT->post->str('email'), $lang['email'], '', 'block', $email_attrs)); $form->addElement(form_makeButton('submit', '', $lang['btn_register'])); $form->endFieldset(); html_form('register', $form); |