Added setDefaults call to initialize the locale field to user's locale, or the station default; removed unnecessary field

This commit is contained in:
Duncan Sommerville 2014-11-05 17:24:08 -05:00
parent b94d34f719
commit eecd3fa188
1 changed files with 3 additions and 5 deletions

View File

@ -53,13 +53,11 @@ class Application_Form_Login extends Zend_Form
$locale->setMultiOptions(Application_Model_Locale::getLocales());
$locale->setDecorators(array('ViewHelper'));
$this->addElement($locale);
$this->setDefaults(array(
"locale" => Application_Model_Locale::getUserLocale()
));
$recaptchaNeeded = false;
if (Application_Model_LoginAttempts::getAttempts($_SERVER['REMOTE_ADDR']) >= 3) {
$recaptchaNeeded = true;
}
if ($recaptchaNeeded) {
// recaptcha
$this->addRecaptcha();
}