SAAS-781 - Code review fixes
This commit is contained in:
commit
75aef986ea
|
@ -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');
|
||||
|
|
|
@ -158,19 +158,21 @@ class LoginController extends Zend_Controller_Action
|
|||
}
|
||||
$user = $query->findOne();
|
||||
|
||||
if (!empty($user)) {
|
||||
$auth = new Application_Model_Auth();
|
||||
if (!empty($user)) {
|
||||
$auth = new Application_Model_Auth();
|
||||
|
||||
$success = $auth->sendPasswordRestoreLink($user, $this->view);
|
||||
if ($success) {
|
||||
$this->_helper->redirector('password-restore-after', 'login');
|
||||
$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;
|
||||
}
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
<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() ?>
|
||||
</label>
|
||||
</dt>
|
||||
<dd id="email-element">
|
||||
<?php echo $this->element->getElement('email') ?>
|
||||
</dd>
|
||||
<?php if($this->element->getElement('email')->hasErrors()): ?>
|
||||
<ul class='errors'>
|
||||
<?php foreach($this->element->getElement('email')->getMessages() as $error): ?>
|
||||
<li><?php echo $error; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<dt id="submit-label"> </dt>
|
||||
<dd id="submit-element">
|
||||
<?php echo $this->element->getElement('submit') ?>
|
||||
</dd>
|
||||
<dd id="cancel-element">
|
||||
<?php echo $this->element->getElement('cancel') ?>
|
||||
</dd>
|
||||
<dl class="zend_form">
|
||||
<dt id="username-label">
|
||||
<dt id="email-label">
|
||||
<label for="email" class="required">
|
||||
<?php echo $this->element->getElement('email')->getLabel() ?>
|
||||
</label>
|
||||
</dt>
|
||||
<dd id="email-element">
|
||||
<?php echo $this->element->getElement('email') ?>
|
||||
</dd>
|
||||
<?php if ($this->element->getElement('email')->hasErrors()): ?>
|
||||
<ul class='errors'>
|
||||
<?php foreach ($this->element->getElement('email')->getMessages() as $error): ?>
|
||||
<li><?php echo $error; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</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"> </dt>
|
||||
<dd id="submit-element">
|
||||
<?php echo $this->element->getElement('submit') ?>
|
||||
</dd>
|
||||
<dd id="cancel-element">
|
||||
<?php echo $this->element->getElement('cancel') ?>
|
||||
</dd>
|
||||
</dl>
|
||||
</form>
|
Loading…
Reference in New Issue