CC-3969: Reset Password: specifying wrong e-mail keeps you on the same page
without possibility to navigate back gracefully - done
This commit is contained in:
parent
2480639e58
commit
c669d3cb47
|
@ -100,6 +100,12 @@ class LoginController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function passwordRestoreAction()
|
public function passwordRestoreAction()
|
||||||
{
|
{
|
||||||
|
global $CC_CONFIG;
|
||||||
|
|
||||||
|
$request = $this->getRequest();
|
||||||
|
$baseUrl = $request->getBaseUrl();
|
||||||
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/login/password-restore.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
|
|
||||||
if (!Application_Model_Preference::GetEnableSystemEmail()) {
|
if (!Application_Model_Preference::GetEnableSystemEmail()) {
|
||||||
$this->_redirect('login');
|
$this->_redirect('login');
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,5 +29,13 @@ class Application_Form_PasswordRestore extends Zend_Form
|
||||||
'ViewHelper'
|
'ViewHelper'
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$cancel = new Zend_Form_Element_Button("cancel");
|
||||||
|
$cancel->class = 'ui-button ui-widget ui-state-default ui-button-text-only center';
|
||||||
|
$cancel->setLabel("Cancel")
|
||||||
|
->setIgnore(True)
|
||||||
|
->setAttrib('onclick', 'redirectToLogin();')
|
||||||
|
->setDecorators(array('ViewHelper'));
|
||||||
|
$this->addElement($cancel);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -21,5 +21,8 @@
|
||||||
<dd id="submit-element">
|
<dd id="submit-element">
|
||||||
<?php echo $this->element->getElement('submit') ?>
|
<?php echo $this->element->getElement('submit') ?>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dd id="cancel-element">
|
||||||
|
<?php echo $this->element->getElement('cancel') ?>
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</form>
|
</form>
|
|
@ -808,6 +808,12 @@ dt.block-display, dd.block-display {
|
||||||
font-size:14px;
|
font-size:14px;
|
||||||
padding: 6px 10px 6px;
|
padding: 6px 10px 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.login-content dd button.ui-button, .login-content dd button.btn {
|
||||||
|
width:100%;
|
||||||
|
font-size:14px;
|
||||||
|
padding: 6px 10px 6px;
|
||||||
|
}
|
||||||
.login-content .hidden, .hidden {
|
.login-content .hidden, .hidden {
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
function redirectToLogin(){
|
||||||
|
window.location = "/Login"
|
||||||
|
}
|
Loading…
Reference in New Issue