Exemple #1
0
 private function getForm($row)
 {
     $user = GWF_User::getStaticOrGuest();
     if ($row === false) {
         $email = $user->getValidMail();
         $type = 0;
         $langid = GWF_Language::getCurrentID();
     } else {
         $email = $row->getEMail();
         $type = $row->getType();
         $langid = $row->getLangID();
     }
     $data = array('email' => array(GWF_Form::STRING, $email, $this->module->lang('th_email')), 'type' => array(GWF_Form::SELECT, GWF_Newsletter::getTypeSelectB($this->module, 'type', $type), $this->module->lang('th_type')), 'langid' => array(GWF_Form::SELECT, GWF_LangSelect::single(GWF_Language::SUPPORTED, 'langid', $langid), $this->module->lang('th_langid')), 'sign' => array(GWF_Form::SUBMIT, $this->module->lang('btn_sign'), ''));
     return new GWF_Form(GDO::table('GWF_Newsletter'), $data);
 }