SAAS-781 - Code review fixes

This commit is contained in:
Duncan Sommerville 2015-07-28 11:47:53 -04:00
commit 75aef986ea
3 changed files with 43 additions and 40 deletions

View File

@ -17,6 +17,7 @@ define('TERMS_AND_CONDITIONS_URL' , 'http://www.sourcefabric.org/en/about/poli
define('PRIVACY_POLICY_URL' , 'http://www.sourcefabric.org/en/about/policy/');
define('USER_MANUAL_URL' , 'http://sourcefabric.booktype.pro/airtime-pro-for-broadcasters');
define('AIRTIME_TRANSIFEX_URL' , 'https://www.transifex.com/projects/p/airtime/');
define('WHMCS_PASSWORD_RESET_URL' , 'https://account.sourcefabric.com/pwreset.php');
define('LICENSE_VERSION' , 'GNU AGPL v.3');
define('LICENSE_URL' , 'http://www.gnu.org/licenses/agpl-3.0-standalone.html');

View File

@ -164,12 +164,14 @@ class LoginController extends Zend_Controller_Action
$success = $auth->sendPasswordRestoreLink($user, $this->view);
if ($success) {
$this->_helper->redirector('password-restore-after', 'login');
} else {
$form->email->addError($this->view->translate(_("Email could not be sent. Check your mail server settings and ensure it has been configured properly.")));
}
} else {
$form->email->addError($this->view->translate(_("There was a problem sending the recovery email.")));
}
} else {
$form->email->addError($this->view->translate(_("We couldn't find the email you entered - you can also try <a href='https://account.sourcefabric.com/pwreset.php'>here</a>.")));
}
$form->email->addError($this->view->translate(_("We couldn't find the email you entered - you can also try <a href='".WHMCS_PASSWORD_RESET_URL."'>here</a>.")));
}
$this->view->form = $form;

View File

@ -1,14 +1,6 @@
<form enctype="application/x-www-form-urlencoded" method="post" action="">
<dl class="zend_form">
<dt id="username-label">
<label for="username" class="required">
<?php echo $this->element->getElement('username')->getLabel() ?>
</label>
</dt>
<dd id="username-element">
<?php echo $this->element->getElement('username') ?>
</dd>
<dt id="email-label">
<label for="email" class="required">
<?php echo $this->element->getElement('email')->getLabel() ?>
@ -25,6 +17,14 @@
</ul>
<?php endif; ?>
<label for="username" class="required">
<?php echo $this->element->getElement('username')->getLabel() ?>
</label>
</dt>
<dd id="username-element">
<?php echo $this->element->getElement('username') ?>
</dd>
<dt id="submit-label">&nbsp;</dt>
<dd id="submit-element">
<?php echo $this->element->getElement('submit') ?>