//array of params for classes $params = array("pageType" => PAGE_ADD, "id" => $id, "mode" => $inlineadd); ////////////////////// data picker ////////////////////// time picker $params['tName'] = $strTableName; $params['strOriginalTableName'] = $strOriginalTableName; $params['xt'] =& $xt; $params['needSearchClauseObj'] = false; $params['includes_js'] = $includes_js; $params['includes_jsreq'] = $includes_jsreq; $params['includes_css'] = $includes_css; $params['locale_info'] = $locale_info; $params['pageAddLikeInline'] = $inlineadd == ADD_INLINE; $params['useTabsOnAdd'] = useTabsOnAdd($strTableName); if ($params['useTabsOnAdd']) { $params['arrAddTabs'] = GetAddTabs($strTableName); } $pageObject = new AddPage($params); //Get detail table keys $detailKeys = $pageObject->detailKeysByM; //Array of fields, which appear on add page $addFields = $pageObject->getFieldsByPageType(); // add button events if exist if ($inlineadd == ADD_SIMPLE) { $pageObject->addButtonHandlers(); } $url_page = substr($_SERVER["SCRIPT_NAME"], strrpos($_SERVER["SCRIPT_NAME"], "/") + 1, 12); //For show detail tables on master page add if ($inlineadd == ADD_SIMPLE || $inlineadd == ADD_MASTER || $inlineadd == ADD_POPUP) { $dpParams = array(); if ($pageObject->isShowDetailTables && !isMobile()) {
/** * Check use tabs and sections on add page or not * @param string $table - current data source table name * @return boolean result - true or false */ function useTabsOnAdd($table) { if (count(GetAddTabs($table))) { return true; } else { return false; } }