diff options
author | Dominik Eckelmann <deckelmann@gmail.com> | 2012-03-14 12:52:36 +0100 |
---|---|---|
committer | Dominik Eckelmann <deckelmann@gmail.com> | 2012-03-14 12:52:36 +0100 |
commit | 3a6d76070be7220b8e5f7c04443aa923bc8cddf2 (patch) | |
tree | dfd00b5d0c5f58ee313eb376a8cb1ee99512bf83 /inc/html.php | |
parent | 03d7247e047c21d2733f837148a1499f56784ae3 (diff) | |
parent | d0caa5642f6e322a026bd5bdac4585ff1b2f40da (diff) | |
download | rpg-3a6d76070be7220b8e5f7c04443aa923bc8cddf2.tar.gz rpg-3a6d76070be7220b8e5f7c04443aa923bc8cddf2.tar.bz2 |
Merge branch 'master' of https://github.com/splitbrain/dokuwiki
Conflicts:
lib/exe/xmlrpc.php
Diffstat (limited to 'inc/html.php')
-rw-r--r-- | inc/html.php | 52 |
1 files changed, 38 insertions, 14 deletions
diff --git a/inc/html.php b/inc/html.php index 1a2d7daef..ef95aa11f 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1176,6 +1176,7 @@ function html_diff($text='',$intro=true,$type=null){ ptln('</div>'); } ?> + <div class="table"> <table class="diff diff_<?php echo $type?>"> <tr> <th colspan="2" <?php echo $l_minor?>> @@ -1187,6 +1188,7 @@ function html_diff($text='',$intro=true,$type=null){ </tr> <?php echo $tdf->format($df)?> </table> + </div> <?php } @@ -1661,26 +1663,48 @@ function html_admin(){ * Form to request a new password for an existing account * * @author Benoit Chesneau <benoit@bchesneau.info> + * @author Andreas Gohr <gohr@cosmocode.de> */ function html_resendpwd() { global $lang; global $conf; global $ID; - print p_locale_xhtml('resendpwd'); - print '<div class="centeralign">'.NL; - $form = new Doku_Form(array('id' => 'dw__resendpwd')); - $form->startFieldset($lang['resendpwd']); - $form->addHidden('do', 'resendpwd'); - $form->addHidden('save', '1'); - $form->addElement(form_makeTag('br')); - $form->addElement(form_makeTextField('login', $_POST['login'], $lang['user'], '', 'block')); - $form->addElement(form_makeTag('br')); - $form->addElement(form_makeTag('br')); - $form->addElement(form_makeButton('submit', '', $lang['btn_resendpwd'])); - $form->endFieldset(); - html_form('resendpwd', $form); - print '</div>'.NL; + $token = preg_replace('/[^a-f0-9]+/','',$_REQUEST['pwauth']); + + if(!$conf['autopasswd'] && $token){ + print p_locale_xhtml('resetpwd'); + print '<div class="centeralign">'.NL; + $form = new Doku_Form(array('id' => 'dw__resendpwd')); + $form->startFieldset($lang['btn_resendpwd']); + $form->addHidden('token', $token); + $form->addHidden('do', 'resendpwd'); + + $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_makeButton('submit', '', $lang['btn_resendpwd'])); + $form->endFieldset(); + html_form('resendpwd', $form); + print '</div>'.NL; + }else{ + print p_locale_xhtml('resendpwd'); + print '<div class="centeralign">'.NL; + $form = new Doku_Form(array('id' => 'dw__resendpwd')); + $form->startFieldset($lang['resendpwd']); + $form->addHidden('do', 'resendpwd'); + $form->addHidden('save', '1'); + $form->addElement(form_makeTag('br')); + $form->addElement(form_makeTextField('login', $_POST['login'], $lang['user'], '', 'block')); + $form->addElement(form_makeTag('br')); + $form->addElement(form_makeTag('br')); + $form->addElement(form_makeButton('submit', '', $lang['btn_resendpwd'])); + $form->endFieldset(); + html_form('resendpwd', $form); + print '</div>'.NL; + } + + } /** |