Ejemplo n.º 1
0
 /**
  * Load the form
  */
 protected function loadForm()
 {
     $rbtHiddenValues[] = array('label' => BL::lbl('Published'), 'value' => 'N');
     $rbtHiddenValues[] = array('label' => BL::lbl('Hidden'), 'value' => 'Y');
     $rbtShowWebsiteValues[] = array('label' => BL::lbl('Yes'), 'value' => 'Y');
     $rbtShowWebsiteValues[] = array('label' => BL::lbl('No'), 'value' => 'N');
     $templates = BackendMailengineModel::getAllTemplatesForDropdown();
     $this->frm = new BackendForm('add');
     $this->frm->addText('subject', null, null, 'inputText title', 'inputTextError title');
     $this->frm->addEditor('text');
     $this->frm->addRadiobutton('hidden', $rbtHiddenValues, 'N');
     $this->frm->addRadiobutton('show_on_website', $rbtShowWebsiteValues, 'Y');
     $this->frm->addDropdown("template_id", $templates);
     $this->meta = new BackendMeta($this->frm, null, 'subject', true);
 }
Ejemplo n.º 2
0
 /**
  * Load the form
  */
 protected function loadForm()
 {
     // set hidden values
     $rbtHiddenValues[] = array('label' => BL::lbl('Published'), 'value' => 'N');
     $rbtHiddenValues[] = array('label' => BL::lbl('Hidden'), 'value' => 'Y');
     $rbtShowWebsiteValues[] = array('label' => BL::lbl('Yes'), 'value' => 'Y');
     $rbtShowWebsiteValues[] = array('label' => BL::lbl('No'), 'value' => 'N');
     $templates = BackendMailengineModel::getAllTemplatesForDropdown();
     // create form
     $this->frm = new BackendForm('edit');
     $this->frm->addText('subject', $this->record['subject'], null, 'inputText title', 'inputTextError title');
     $this->frm->addEditor('text', $this->record['text']);
     $this->frm->addRadiobutton('hidden', $rbtHiddenValues, $this->record['hidden']);
     $this->frm->addDropdown("template_id", $templates, $this->record['template_id']);
     $this->frm->addRadiobutton('show_on_website', $rbtShowWebsiteValues, $this->record['show_on_website']);
     // meta
     $this->meta = new BackendMeta($this->frm, $this->record['meta_id'], 'subject', true);
     $this->meta->setUrlCallback('Backend\\Modules\\Mailengine\\Engine\\Model', 'getUrl', array($this->record['id']));
 }