From cc204bbd1f1625352ddd0edaacdd297fe022881c Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 31 Oct 2011 15:41:53 +0100 Subject: honor autopasswd setting for resend password When autopasswd is disabled, the resend password option now asks for a new password instead of autogenerating a new one and sending it by mail. Note to translators: the wording for btn_resendpwd and resendpwd changed to be more universal. English and German language files where updated - other languages need to be adjusted. Conflicts: inc/lang/en/lang.php --- inc/html.php | 51 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 14 deletions(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 1a2d7daef..dea9ac6ab 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1661,26 +1661,49 @@ function html_admin(){ * Form to request a new password for an existing account * * @author Benoit Chesneau + * @author Andreas Gohr */ function html_resendpwd() { global $lang; global $conf; global $ID; - print p_locale_xhtml('resendpwd'); - print '
'.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 '
'.NL; + $token = preg_replace('/[^a-f0-9]+/','',$_REQUEST['pwauth']); + + if(!$conf['autopasswd'] && $token){ + print p_locale_xhtml('resetpwd'); + print '
'.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_makeTag('br')); + + $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 '
'.NL; + }else{ + print p_locale_xhtml('resendpwd'); + print '
'.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 '
'.NL; + } + + } /** -- cgit v1.2.3 From c7b28ffda48d3e6e225940a74b00ee5011f45b4b Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 4 Feb 2012 13:26:50 +0000 Subject: added div.table around non-editable content as well (FS#1980) --- inc/html.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 1a2d7daef..ece26d136 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1176,6 +1176,7 @@ function html_diff($text='',$intro=true,$type=null){ ptln(''); } ?> +
format($df)?>
> @@ -1187,6 +1188,7 @@ function html_diff($text='',$intro=true,$type=null){
+
Date: Fri, 17 Feb 2012 21:48:02 +0100 Subject: removed commented line --- inc/html.php | 1 - 1 file changed, 1 deletion(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index dea9ac6ab..50989f236 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1677,7 +1677,6 @@ function html_resendpwd() { $form->startFieldset($lang['btn_resendpwd']); $form->addHidden('token', $token); $form->addHidden('do', 'resendpwd'); - //$form->addElement(form_makeTag('br')); $form->addElement(form_makePasswordField('pass', $lang['pass'], '', 'block', array('size'=>'50'))); $form->addElement(form_makePasswordField('passchk', $lang['passchk'], '', 'block', array('size'=>'50'))); -- cgit v1.2.3