[FEATURE][CONF] Various messages in felogin need own stdWrap
authorJigal van Hemert <jigal@xs4all.nl>
Wed, 8 Feb 2012 18:43:10 +0000 (19:43 +0100)
committerSteffen Ritter <info@rs-websystems.de>
Mon, 13 Feb 2012 08:00:41 +0000 (09:00 +0100)
To make styling of various messages easier introduce new stdWraps:
* forgotErrorMessage_stdWrap
* forgotResetMessageEmailSentMessage_stdWrap
* changePasswordNotValidMessage_stdWrap
* changePasswordTooShortMessage_stdWrap
* changePasswordNotEqualMessage_stdWrap
* changePasswordDoneMessage_stdWrap

Change-Id: Ia8b0614fe4486756795c663d4d4609427e61bf52
Resolves: #29577
Releases: 4.7
Reviewed-on: http://review.typo3.org/8918
Reviewed-by: Philipp Gampe
Reviewed-by: Stefan Neufeind
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/felogin/doc/manual.sxw
typo3/sysext/felogin/ext_typoscript_setup.txt
typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php

index 140e537..b035bc5 100644 (file)
Binary files a/typo3/sysext/felogin/doc/manual.sxw and b/typo3/sysext/felogin/doc/manual.sxw differ
index 30dde90..35821ba 100644 (file)
@@ -67,6 +67,21 @@ plugin.tx_felogin_pi1 {
        forgotMessage_stdWrap {
                wrap = <div>|</div>
        }
+       forgotErrorMessage_stdWrap {
+               wrap = <div>|</div>
+       }
+       forgotResetMessageEmailSentMessage_stdWrap {
+               wrap = <div>|</div>
+       }
+       changePasswordNotValidMessage_stdWrap {
+               wrap = <div>|</div>
+       }
+       changePasswordTooShortMessage_stdWrap {
+               wrap = <div>|</div>
+       }
+       changePasswordNotEqualMessage_stdWrap {
+               wrap = <div>|</div>
+       }
        
        changePasswordHeader_stdWrap {
                wrap = <h3>|</h3>
@@ -74,6 +89,9 @@ plugin.tx_felogin_pi1 {
        changePasswordMessage_stdWrap {
                wrap = <div>|</div>
        }
+       changePasswordDoneMessage_stdWrap {
+               wrap = <div>|</div>
+    }
 
        cookieWarning_stdWrap {
                wrap = <p style="color:red; font-weight:bold;">|</p>
index 271d79a..440de2c 100644 (file)
@@ -201,9 +201,9 @@ class tx_felogin_pi1 extends tslib_pibase {
                                }
                                        // generate message
                                if ($error) {
-                                       $markerArray['###STATUS_MESSAGE###'] = $this->cObj->stdWrap($error, $this->conf['forgotMessage_stdWrap.']);
+                                       $markerArray['###STATUS_MESSAGE###'] = $this->cObj->stdWrap($error, $this->conf['forgotErrorMessage_stdWrap.']);
                                } else {
-                                       $markerArray['###STATUS_MESSAGE###'] = $this->cObj->stdWrap($this->pi_getLL('ll_forgot_reset_message_emailSent', '', 1), $this->conf['forgotMessage_stdWrap.']);
+                                       $markerArray['###STATUS_MESSAGE###'] = $this->cObj->stdWrap($this->pi_getLL('ll_forgot_reset_message_emailSent', '', 1), $this->conf['forgotResetMessageEmailSentMessage_stdWrap.']);
                                }
                                $subpartArray['###FORGOT_FORM###'] = '';
 
@@ -268,7 +268,7 @@ class tx_felogin_pi1 extends tslib_pibase {
 
                $hash = explode('|', $piHash);
                if (intval($uid) == 0) {
-                       $markerArray['###STATUS_MESSAGE###'] = $this->getDisplayText('change_password_notvalid_message', $this->conf['changePasswordMessage_stdWrap.']);
+                       $markerArray['###STATUS_MESSAGE###'] = $this->getDisplayText('change_password_notvalid_message', $this->conf['changePasswordNotValidMessage_stdWrap.']);
                        $subpartArray['###CHANGEPASSWORD_FORM###'] = '';
                } else {
                        $user = $this->pi_getRecord('fe_users', intval($uid));
@@ -276,7 +276,7 @@ class tx_felogin_pi1 extends tslib_pibase {
                        $compareHash = explode('|', $userHash);
 
                        if (!$compareHash || !$compareHash[1] || $compareHash[0] < time() ||  $hash[0] != $compareHash[0] ||  md5($hash[1]) != $compareHash[1]) {
-                               $markerArray['###STATUS_MESSAGE###'] = $this->getDisplayText('change_password_notvalid_message',$this->conf['changePasswordMessage_stdWrap.']);
+                               $markerArray['###STATUS_MESSAGE###'] = $this->getDisplayText('change_password_notvalid_message',$this->conf['changePasswordNotValidMessage_stdWrap.']);
                                $subpartArray['###CHANGEPASSWORD_FORM###'] = '';
                        } else {
                                        // all is fine, continue with new password
@@ -284,9 +284,9 @@ class tx_felogin_pi1 extends tslib_pibase {
 
                                if (isset($postData['changepasswordsubmit'])) {
                                        if (strlen($postData['password1']) < $minLength) {
-                                               $markerArray['###STATUS_MESSAGE###'] = sprintf($this->getDisplayText('change_password_tooshort_message', $this->conf['changePasswordMessage_stdWrap.']), $minLength);
+                                               $markerArray['###STATUS_MESSAGE###'] = sprintf($this->getDisplayText('change_password_tooshort_message', $this->conf['changePasswordTooShortMessage_stdWrap.']), $minLength);
                                        } elseif ($postData['password1'] != $postData['password2']) {
-                                               $markerArray['###STATUS_MESSAGE###'] = sprintf($this->getDisplayText('change_password_notequal_message', $this->conf['changePasswordMessage_stdWrap.']), $minLength);
+                                               $markerArray['###STATUS_MESSAGE###'] = sprintf($this->getDisplayText('change_password_notequal_message', $this->conf['changePasswordNotEqualMessage_stdWrap.']), $minLength);
                                        } else {
                                                $newPass = $postData['password1'];
 
@@ -309,7 +309,7 @@ class tx_felogin_pi1 extends tslib_pibase {
                                                                'uid=' . $user['uid'],
                                                                array('password' => $newPass, 'felogin_forgotHash' => '')
                                                        );
-                                               $markerArray['###STATUS_MESSAGE###'] = $this->getDisplayText('change_password_done_message', $this->conf['changePasswordMessage_stdWrap.']);
+                                               $markerArray['###STATUS_MESSAGE###'] = $this->getDisplayText('change_password_done_message', $this->conf['changePasswordDoneMessage_stdWrap.']);
                                                $done = TRUE;
                                                $subpartArray['###CHANGEPASSWORD_FORM###'] = '';
                                                $markerArray['###BACKLINK_LOGIN###'] = $this->getPageLink($this->pi_getLL('ll_forgot_header_backToLogin', '', 1), array());
@@ -987,4 +987,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/felogin/pi1/class.tx_felogin_pi1.php']);
 }
 
-?>
\ No newline at end of file
+?>