From ae2cab4f84b5ccada7ace4108c30376a6f6214d3 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 31 Jul 2013 18:38:02 +0200 Subject: add html5 attributes to register form --- inc/html.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'inc/html.php') 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 '
'.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); -- cgit v1.2.3 From 4ca5544873b7682dd9e905ad9d0028bf9bcddd5c Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 31 Jul 2013 18:38:31 +0200 Subject: add html5 attributes to update profile form --- inc/html.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index d94291090..53f4c45ff 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1356,10 +1356,10 @@ function html_updateprofile(){ global $auth; print p_locale_xhtml('updateprofile'); + print '
'.NL; $fullname = $INPUT->post->str('fullname', $INFO['userinfo']['name'], true); $email = $INPUT->post->str('email', $INFO['userinfo']['mail'], true); - print '
'.NL; $form = new Doku_Form(array('id' => 'dw__register')); $form->startFieldset($lang['profile']); $form->addHidden('do', 'profile'); @@ -1368,9 +1368,9 @@ function html_updateprofile(){ $attr = array('size'=>'50'); if (!$auth->canDo('modName')) $attr['disabled'] = 'disabled'; $form->addElement(form_makeTextField('fullname', $fullname, $lang['fullname'], '', 'block', $attr)); - $attr = array('size'=>'50'); + $attr = array('size'=>'50', 'class'=>'edit'); if (!$auth->canDo('modMail')) $attr['disabled'] = 'disabled'; - $form->addElement(form_makeTextField('email', $email, $lang['email'], '', 'block', $attr)); + $form->addElement(form_makeField('email','email', $email, $lang['email'], '', 'block', $attr)); $form->addElement(form_makeTag('br')); if ($auth->canDo('modPass')) { $form->addElement(form_makePasswordField('newpass', $lang['newpass'], '', 'block', array('size'=>'50'))); @@ -1378,10 +1378,11 @@ function html_updateprofile(){ } if ($conf['profileconfirm']) { $form->addElement(form_makeTag('br')); - $form->addElement(form_makePasswordField('oldpass', $lang['oldpass'], '', 'block', array('size'=>'50'))); + $form->addElement(form_makePasswordField('oldpass', $lang['oldpass'], '', 'block', array('size'=>'50', 'required' => 'required'))); } $form->addElement(form_makeButton('submit', '', $lang['btn_save'])); $form->addElement(form_makeButton('reset', '', $lang['btn_reset'])); + $form->endFieldset(); html_form('updateprofile', $form); print '
'.NL; -- cgit v1.2.3 From 5a99d25b24f7e14f137084100f40325b7a2a71b4 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Thu, 1 Aug 2013 16:38:02 +0100 Subject: added aria attributes to edit mode --- inc/html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index fb39fcb3c..9c69c9845 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1488,7 +1488,7 @@ function html_edit(){ echo 'textChanged = ' . ($mod ? 'true' : 'false'); echo '/*!]]>*/' . NL; } ?> -
+
-- cgit v1.2.3