示例#1
0
 function init()
 {
     parent::init();
     $config_m = $this->add('xepan\\base\\Model_ConfigJsonModel', ['fields' => ['lead_source' => 'text'], 'config_key' => 'MARKETING_LEAD_SOURCE', 'application' => 'marketing']);
     $config_m->add('xepan\\hr\\Controller_ACL');
     $config_m->tryLoadAny();
     $this->add('View')->set('Enter comma seperated values with no space');
     $form = $this->add('Form');
     $form->setModel($config_m, ['lead_source']);
     $form->getElement('lead_source')->set($config_m['lead_source']);
     $form->addSubmit('Save')->addClass('btn btn-primary');
     if ($form->isSubmitted()) {
         $form->save();
         $form->js(null, $form->js()->reload())->univ()->successMessage('Information Saved')->execute();
     }
 }
示例#2
0
 function init()
 {
     parent::init();
     $tabs = $this->add('Tabs');
     // $objects = ['Facebook','Linkedin'];
     $objects = scandir($plug_path = getcwd() . "/../vendor/xepan/marketing/lib/SocialPosters");
     foreach ($objects as $object) {
         if ($object != "." && $object != "..") {
             if (filetype($plug_path . '/' . $object) != "dir") {
                 $object = str_replace(".php", "", $object);
                 $t = $tabs->addTab($object);
                 $social = $t->add('xepan/marketing/SocialPosters_' . $object);
                 $social->config_page();
                 // $login_status_view->setHTML($object. ' - '. $social->login_status());
             }
         }
     }
 }