Exemple #1
0
 /**
  * Load the form
  */
 private function loadForm()
 {
     $this->isGod = BackendAuthentication::getUser()->isGod();
     $this->frm = new BackendForm('settingsEmail');
     // email settings
     $mailerFrom = BackendModel::getModuleSetting('core', 'mailer_from');
     $this->frm->addText('mailer_from_name', isset($mailerFrom['name']) ? $mailerFrom['name'] : '');
     $this->frm->addText('mailer_from_email', isset($mailerFrom['email']) ? $mailerFrom['email'] : '');
     $mailerTo = BackendModel::getModuleSetting('core', 'mailer_to');
     $this->frm->addText('mailer_to_name', isset($mailerTo['name']) ? $mailerTo['name'] : '');
     $this->frm->addText('mailer_to_email', isset($mailerTo['email']) ? $mailerTo['email'] : '');
     $mailerReplyTo = BackendModel::getModuleSetting('core', 'mailer_reply_to');
     $this->frm->addText('mailer_reply_to_name', isset($mailerReplyTo['name']) ? $mailerReplyTo['name'] : '');
     $this->frm->addText('mailer_reply_to_email', isset($mailerReplyTo['email']) ? $mailerReplyTo['email'] : '');
     if ($this->isGod) {
         $mailerType = BackendModel::getModuleSetting('core', 'mailer_type', 'mail');
         $this->frm->addDropdown('mailer_type', array('mail' => 'PHP\'s mail', 'smtp' => 'SMTP'), $mailerType);
         // smtp settings
         $this->frm->addText('smtp_server', BackendModel::getModuleSetting('core', 'smtp_server', ''));
         $this->frm->addText('smtp_port', BackendModel::getModuleSetting('core', 'smtp_port', 25));
         $this->frm->addText('smtp_username', BackendModel::getModuleSetting('core', 'smtp_username', ''));
         $this->frm->addPassword('smtp_password', BackendModel::getModuleSetting('core', 'smtp_password', ''));
     }
     $this->tpl->assign('isGod', $this->isGod);
 }
 /**
  * Load the form
  */
 private function loadForm()
 {
     $this->frm = new BackendForm();
     $this->frm->addPassword('backend_new_password');
     $this->frm->addPassword('backend_new_password_repeated');
     $this->frm->getField('backend_new_password')->setAttributes(array('autocomplete' => 'off'));
     $this->frm->getField('backend_new_password_repeated')->setAttributes(array('autocomplete' => 'off'));
 }