public function getAdminForm()
 {
     $objForm = parent::getAdminForm();
     $strOpener = getLinkAdminDialog("mediamanager", "folderListFolderview", "&form_element=char2", $this->getLang("commons_open_browser"), $this->getLang("commons_open_browser"), "icon_externalBrowser", $this->getLang("commons_open_browser"));
     $objForm->getField("char2")->setStrOpener($strOpener);
     return $objForm;
 }
 public function getAdminForm()
 {
     $objForm = parent::getAdminForm();
     $arrClassesDD = array();
     foreach (class_resourceloader::getInstance()->getFolderContent("/portal/forms", array(".php")) as $strClass) {
         $arrClassesDD[$strClass] = $strClass;
     }
     $objForm->getField("class")->setArrKeyValues($arrClassesDD);
     return $objForm;
 }
 /**
  * @return class_admin_formgenerator|null
  */
 public function getAdminForm()
 {
     $objForm = parent::getAdminForm();
     $arrNavigationsDropdown = array();
     foreach (class_module_navigation_tree::getObjectList() as $objOneNavigation) {
         $arrNavigationsDropdown[$objOneNavigation->getSystemid()] = $objOneNavigation->getStrDisplayName();
     }
     $objForm->getField("repo")->setArrKeyValues($arrNavigationsDropdown);
     return $objForm;
 }
 public function getAdminForm()
 {
     $objForm = parent::getAdminForm();
     $arrRawVotings = class_module_votings_voting::getObjectList(true);
     $arrVotings = array();
     foreach ($arrRawVotings as $objOneVoting) {
         $arrVotings[$objOneVoting->getSystemid()] = $objOneVoting->getStrTitle();
     }
     $objForm->getField("char1")->setArrKeyValues($arrVotings);
     return $objForm;
 }
 /**
  * @return class_admin_formgenerator|null
  */
 public function getAdminForm()
 {
     $objForm = parent::getAdminForm();
     $objGuestbooks = class_module_guestbook_guestbook::getObjectList();
     $arrGuestbooks = array();
     foreach ($objGuestbooks as $objOneGuestbook) {
         $arrGuestbooks[$objOneGuestbook->getSystemid()] = $objOneGuestbook->getStrDisplayName();
     }
     $objForm->getField("guestbook")->setArrKeyValues($arrGuestbooks);
     return $objForm;
 }
 public function getAdminForm()
 {
     //Load all archives
     $arrObjArchs = class_module_mediamanager_repo::getObjectList();
     $arrArchives = array();
     foreach ($arrObjArchs as $objOneArchive) {
         $arrArchives[$objOneArchive->getSystemid()] = $objOneArchive->getStrDisplayName();
     }
     $objForm = parent::getAdminForm();
     $objForm->getField("repo")->setArrKeyValues($arrArchives);
     return $objForm;
 }
 public function getAdminForm()
 {
     $objForm = parent::getAdminForm();
     $arrRawCats = class_module_faqs_category::getObjectList();
     $arrCats = array();
     //addd an "i want all" cat ;)
     $arrCats["0"] = $this->getLang("commons_all_categories");
     foreach ($arrRawCats as $objOneCat) {
         $arrCats[$objOneCat->getSystemid()] = $objOneCat->getStrDisplayName();
     }
     $objForm->getField("category")->setArrKeyValues($arrCats);
     return $objForm;
 }
 public function getAdminForm()
 {
     $arrDlArchives = class_module_mediamanager_repo::getObjectList();
     $arrDlDD = array();
     if (count($arrDlArchives) > 0) {
         foreach ($arrDlArchives as $objOneArchive) {
             $arrDlDD[$objOneArchive->getSystemid()] = $objOneArchive->getStrDisplayName();
         }
     }
     $objForm = parent::getAdminForm();
     $objForm->getField("char2")->setArrKeyValues($arrDlDD);
     return $objForm;
 }
 public function getAdminForm()
 {
     $arrGroups = class_module_user_group::getObjectList();
     $arrGroupsDD = array();
     $arrGroupsDD[0] = $this->getLang("userlist_all");
     if (count($arrGroups) > 0) {
         foreach ($arrGroups as $objOneGroup) {
             $arrGroupsDD[$objOneGroup->getSystemid()] = $objOneGroup->getStrName();
         }
     }
     $objForm = parent::getAdminForm();
     $objForm->getField("char2")->setArrKeyValues($arrGroupsDD);
     return $objForm;
 }
 public function getAdminForm()
 {
     $objForm = parent::getAdminForm();
     $arrGroups = class_module_user_group::getObjectList();
     $arrGroupsDD = array();
     foreach ($arrGroups as $objOneGroup) {
         if ($objOneGroup->getStrSubsystem() == "kajona") {
             $arrGroupsDD[$objOneGroup->getSystemid()] = $objOneGroup->getStrName();
         }
     }
     $objForm->getField("group")->setArrKeyValues($arrGroupsDD);
     $objForm->addField(new class_formentry_textrow("hint"))->setStrValue($this->getLang("portalregistration_hint"));
     $objForm->setFieldToPosition("hint", 1);
     return $objForm;
 }
 public function getAdminForm()
 {
     $objForm = parent::getAdminForm();
     $arrRawGals = class_module_mediamanager_repo::getObjectList();
     $arrGalleries = array();
     foreach ($arrRawGals as $objOneGal) {
         $arrGalleries[$objOneGal->getSystemid()] = $objOneGal->getStrDisplayName();
     }
     $objForm->getField("repo")->setArrKeyValues($arrGalleries);
     $objForm->addField(new class_formentry_headline("h2"))->setStrValue($this->getLang("headline_detail"));
     $objForm->addField(new class_formentry_textrow("t2"))->setStrValue($this->getLang("hint_detail"));
     $objForm->setFieldToPosition("h2", 3);
     $objForm->setFieldToPosition("t2", 4);
     $objForm->addField(new class_formentry_headline("h3"))->setStrValue($this->getLang("headline_overlay"));
     $objForm->addField(new class_formentry_textrow("t3"))->setStrValue($this->getLang("hint_text"));
     $objForm->setFieldToPosition("h3", 7);
     $objForm->setFieldToPosition("t3", 8);
     return $objForm;
 }
 /**
  * Creates the backend form to enter a new map configuration
  * @return class_admin_formgenerator|null
  */
 public function getAdminForm()
 {
     $objForm = parent::getAdminForm();
     $objForm->addField(new class_formentry_button("", "geocode_button"))->setStrLabel($this->getLang("maps_geocode_button"))->setStrEventhandler("onclick=\"lookupAddress(); return false;\"");
     $objForm->addField(new class_formentry_textrow("geocode_hint"))->setStrValue($this->getLang("maps_geocode_hint"));
     $objForm->setFieldToPosition("geocode_button", 2);
     $objForm->setFieldToPosition("geocode_hint", 2);
     $floatLat = "47.660727";
     $floatLng = "9.181154";
     if ($this->getStrChar2() != "") {
         $arrLatLng = explode(',', $this->getStrChar2());
         if (count($arrLatLng) == 2) {
             $floatLat = $arrLatLng[0];
             $floatLng = $arrLatLng[1];
         }
     }
     $strJs = "\n\t\t<div id=\"map_canvas\" style=\"width: 640px; height: 400px;\"></div>\n\n\t\t<script type=\"text/javascript\" src=\"http://maps.googleapis.com/maps/api/js?sensor=false\"></script>\n\t    <script type=\"text/javascript\">\n\t\t\tvar map;\n\t\t\tvar infoWindow;\n\t\t\tvar startPos = new google.maps.LatLng('" . $floatLat . "', '" . $floatLng . "');\n\t\t\tvar geocoder = new google.maps.Geocoder();\n\n\t\t\tvar mapOptions = {\n\t\t\t\tzoom: 10,\n\t\t\t\tcenter: startPos,\n\t\t\t\tmapTypeId: google.maps.MapTypeId.ROADMAP\n\t\t\t};\n\t\t\tmap = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);\n\n\t\t\tvar marker = new google.maps.Marker({\n                position: startPos,\n                map: map,\n                draggable: true\n            });\n\n            infoWindow = new google.maps.InfoWindow();\n            infoWindow.setPosition(startPos);\n            infoWindow.setContent(document.getElementById('text').value);\n            infoWindow.open(map);\n\n            google.maps.event.addListener(marker, 'click', function() {\n                infoWindow.open(map);\n            });\n\n            google.maps.event.addListener(marker, 'dragend', function(event) {\n                document.getElementById('char2').value = event.latLng.toUrlValue();\n                infoWindow.setPosition(event.latLng);\n\t\t\t});\n\n            //refresh infoWindow when content in CKEditor was changed\n            var editor = CKEDITOR.instances['text'];\n\t\t\tvar timer;\n\t\t\tfunction somethingChanged() {\n\t\t\t    if (timer)\n\t\t\t        return;\n\n\t\t\t    timer = setTimeout(function() {\n\t\t\t        timer = 0;\n\t\t\t        infoWindow.setContent(editor.getData());\n\t\t\t    }, 200);\n\t\t\t}\n\n            editor.on('key', somethingChanged);\n            editor.on('paste', somethingChanged);\n            editor.on('afterCommandExec', somethingChanged);\n\n\t\t\tfunction lookupAddress() {\n\t\t\t\tvar address = document.getElementById('char1').value;\n\t\t\t\tgeocoder.geocode( {'address': address}, function (results, status) {\n\t\t\t\t\tif (status == google.maps.GeocoderStatus.OK) {\n\t\t\t\t\t   var pos = results[0].geometry.location;\n\t\t\t\t\t   map.setCenter(pos);\n\t\t\t\t\t   marker.setPosition(pos);\n\t\t\t\t\t   infoWindow.setPosition(pos);\n\t\t\t\t\t   document.getElementById('char2').value = pos.toUrlValue();\n\t\t\t\t\t} else {\n\t\t\t\t\t   alert('" . addslashes($this->getLang("maps_geocode_error")) . "'.replace('{error}', status));\n\t\t\t\t\t}\n\t\t\t    });\n\t\t\t}\n        </script>";
     $objForm->addField(new class_formentry_plaintext("js"))->setStrValue($strJs);
     return $objForm;
 }
 /**
  * Returns an abstract of the current element
  *
  * @return string
  */
 public function getContentTitle()
 {
     $this->loadElementData();
     if ($this->getStrTitle() != "") {
         return htmlStripTags($this->getStrTitle());
     } else {
         if ($this->getStrTextContent() != "") {
             return uniStrTrim(htmlStripTags($this->getStrTextContent()), 120);
         } else {
             return parent::getContentTitle();
         }
     }
 }
 public function getAdminForm()
 {
     $objForm = parent::getAdminForm();
     $arrRawQueries = class_module_search_search::getObjectList();
     $arrQueries = array();
     foreach ($arrRawQueries as $objOneQuery) {
         $arrQueries[$objOneQuery->getSystemid()] = $objOneQuery->getStrDisplayName();
     }
     $objForm->getField("query")->setArrKeyValues($arrQueries);
     return $objForm;
 }
 public function getAdminForm()
 {
     $objForm = parent::getAdminForm();
     $arrRawCats = class_module_news_category::getObjectList();
     $arrCats = array();
     $arrCats[0] = $this->getLang("commons_all_categories");
     foreach ($arrRawCats as $objOneCat) {
         $arrCats[$objOneCat->getSystemid()] = $objOneCat->getStrTitle();
     }
     $objForm->getField("category")->setArrKeyValues($arrCats);
     return $objForm;
 }