/** * Load the form */ private function loadForm() { $this->isGod = BackendAuthentication::getUser()->isGod(); $this->frm = new BackendForm('settingsEmail'); // email settings $mailerFrom = $this->get('fork.settings')->get('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'] : '')->setAttribute('type', 'email'); $mailerTo = $this->get('fork.settings')->get('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'] : '')->setAttribute('type', 'email'); $mailerReplyTo = $this->get('fork.settings')->get('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'] : '')->setAttribute('type', 'email'); if ($this->isGod) { $mailerType = $this->get('fork.settings')->get('Core', 'mailer_type', 'mail'); $this->frm->addDropdown('mailer_type', array('mail' => 'PHP\'s mail', 'smtp' => 'SMTP'), $mailerType); // smtp settings $this->frm->addText('smtp_server', $this->get('fork.settings')->get('Core', 'smtp_server', '')); $this->frm->addText('smtp_port', $this->get('fork.settings')->get('Core', 'smtp_port', 25)); $this->frm->addText('smtp_username', $this->get('fork.settings')->get('Core', 'smtp_username', '')); $this->frm->addPassword('smtp_password', $this->get('fork.settings')->get('Core', 'smtp_password', '')); $this->frm->addDropdown('smtp_secure_layer', array('no' => ucfirst(BL::lbl('None')), 'ssl' => 'SSL', 'tls' => 'TLS'), $this->get('fork.settings')->get('Core', 'smtp_secure_layer', 'no')); } $this->tpl->assign('isGod', $this->isGod); }
/** * Load the forms */ private function load() { $this->frm = new BackendForm(null, null, 'post', true, false); $this->frm->addText('backend_email'); $this->frm->addPassword('backend_password'); $this->frmForgotPassword = new BackendForm('forgotPassword'); $this->frmForgotPassword->addText('backend_email_forgot'); }
/** * Load the forms */ private function load() { $this->frm = new BackendForm(null, null, 'post', true, false); $this->frm->addText('backend_email')->setAttribute('placeholder', \SpoonFilter::ucfirst(BL::lbl('Email')))->setAttribute('type', 'email'); $this->frm->addPassword('backend_password')->setAttribute('placeholder', \SpoonFilter::ucfirst(BL::lbl('Password'))); $this->frmForgotPassword = new BackendForm('forgotPassword'); $this->frmForgotPassword->addText('backend_email_forgot'); }
/** * 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')); }
/** * Loads the account settings form */ private function loadAccountForm() { // init account settings form $this->frmAccount = new BackendForm('settingsAccount'); // add fields for campaignmonitor API $this->frmAccount->addText('url', $this->settings['cm_url']); $this->frmAccount->addText('username', $this->settings['cm_username']); $this->frmAccount->addPassword('password', $this->settings['cm_password']); if ($this->accountLinked) { $this->frmAccount->getField('url')->setAttributes(array('disabled' => 'disabled')); $this->frmAccount->getField('username')->setAttributes(array('disabled' => 'disabled')); $this->frmAccount->getField('password')->setAttributes(array('disabled' => 'disabled')); } }