summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2013-07-31 18:38:02 +0200
committerChristopher Smith <chris@jalakai.co.uk>2013-07-31 18:38:02 +0200
commita669bfe08c4c0ef180e38dd3189eaf81c0029f1c (patch)
tree30a472d4309e2627205b3612b47eea1efd1536fe
parent07ff0babae240ba072a3bc8b83a989c4305c24cd (diff)
downloadrpg-a669bfe08c4c0ef180e38dd3189eaf81c0029f1c.tar.gz
rpg-a669bfe08c4c0ef180e38dd3189eaf81c0029f1c.tar.bz2
add html5 attributes to register form
-rw-r--r--inc/html.php13
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);