Ejemplo n.º 1
0
 /**
  * Edit Popup
  * @param Rss $p_oRss
  * @param array $aTrackersSelect
  * @param array $aCategoriesSelect
  * @return string Code HTML
  */
 private function createEditPopup($p_oRss, $aTrackersSelect, $aCategoriesSelect)
 {
     $oPopup = new View('popup');
     $oPopup->addData('id', $p_oRss->getId());
     $oPopup->addData('buttonstyle', 'btn-primary');
     $oPopup->addData('buttonicon', 'fa-edit');
     $oPopup->addData('buttontext', Language::translate('RSS_ADMIN_EDIT_EDIT'));
     $oPopup->addData('title', Language::translate('RSS_ADMIN_EDIT_TITLE'));
     $oFormEdit = new FormGenerator();
     $oFormEdit->setAction('index.php?p=adminrss&edit=' . $p_oRss->getId());
     $oFormEdit->addSelect(Language::translate('RSS_ADMIN_EDIT_TRACKER'), 'tracker', $aTrackersSelect, $p_oRss->getTrackerId());
     $oFormEdit->addSelect(Language::translate('RSS_ADMIN_EDIT_ENCODE'), 'encoding', Config::getEncodes(), $p_oRss->getEncoding());
     $oFormEdit->addInput(Language::translate('RSS_ADMIN_EDIT_URL'), 'url', true, false, 'text', '', $p_oRss->getUrl());
     $oFormEdit->addInput(Language::translate('RSS_ADMIN_EDIT_MASK'), 'mask', true, false, 'text', '', $p_oRss->getMask());
     $oFormEdit->addCheckbox(Language::translate('RSS_ADMIN_EDIT_DATE'), 'forcedate', $p_oRss->isForcedate());
     $oFormEdit->addCheckbox(Language::translate('RSS_ADMIN_EDIT_DEL'), 'delete');
     $oFormEdit->create();
     $oPopup->addData('content', $oFormEdit->getCode());
     $oPopup->create();
     return $oPopup->getCode();
 }