function BxEventsFormSearch() { $oProfileFields = new BxDolProfileFields(0); $aCountries = $oProfileFields->convertValues4Input('#!Country'); $aCountries = array_merge(array('' => _t('_bx_events_all_countries')), $aCountries); $aCustomForm = array('form_attrs' => array('name' => 'form_search_events', 'action' => '', 'method' => 'get'), 'params' => array('db' => array('submit_name' => 'submit_form'), 'csrf' => array('disable' => true)), 'inputs' => array('Keyword' => array('type' => 'text', 'name' => 'Keyword', 'caption' => _t('_bx_events_caption_keyword'), 'required' => true, 'checker' => array('func' => 'length', 'params' => array(3, 100), 'error' => _t('_bx_events_err_keyword')), 'db' => array('pass' => 'Xss')), 'Country' => array('type' => 'select_box', 'name' => 'Country', 'caption' => _t('_bx_events_caption_country'), 'values' => $aCountries, 'required' => true, 'checker' => array('func' => 'preg', 'params' => array('/^[a-zA-Z]{0,2}$/'), 'error' => _t('_bx_events_err_country')), 'db' => array('pass' => 'Preg', 'params' => array('/([a-zA-Z]{0,2})/'))), 'Submit' => array('type' => 'submit', 'name' => 'submit_form', 'value' => _t('_Submit'), 'colspan' => true))); parent::BxTemplFormView($aCustomForm); }
function BxStoreFormSearch() { bx_import('BxDolCategories'); $oCategories = new BxDolCategories(); $oCategories->getTagObjectConfig(); $aCategories = $oCategories->getCategoriesList('bx_store', (int) $iProfileId, true); $aCustomForm = array('form_attrs' => array('name' => 'form_search_store', 'action' => '', 'method' => 'get'), 'params' => array('db' => array('submit_name' => 'submit_form'), 'csrf' => array('disable' => true)), 'inputs' => array('Keyword' => array('type' => 'text', 'name' => 'Keyword', 'caption' => _t('_bx_store_form_caption_keyword'), 'required' => true, 'checker' => array('func' => 'length', 'params' => array(3, 100), 'error' => _t('_bx_store_form_err_keyword')), 'db' => array('pass' => 'Xss')), 'Category' => array('type' => 'select_box', 'name' => 'Category', 'caption' => _t('_bx_store_form_caption_category'), 'values' => $aCategories, 'required' => true, 'checker' => array('func' => 'avail', 'error' => _t('_bx_store_form_err_category')), 'db' => array('pass' => 'Xss')), 'Submit' => array('type' => 'submit', 'name' => 'submit_form', 'value' => _t('_Submit'), 'colspan' => true))); parent::BxTemplFormView($aCustomForm); }
function BxSitesFormAdd($oModule, $aParam = array()) { $this->_oModule = $oModule; $this->_aParam = $aParam; $this->_aCustomForm = count($this->_aParam) > 0 ? $this->getFullForm() : $this->getUrlForm(); $aFormInputsSubmit = array('Submit' => array('type' => 'submit', 'name' => 'submit_form', 'value' => _t('_Submit'), 'colspan' => false)); $this->_aCustomForm['inputs'] = array_merge($this->_aCustomForm['inputs'], $aFormInputsSubmit); parent::BxTemplFormView($this->_aCustomForm); }
function BxDolFormMedia($aCustomForm) { if (isset($aCustomForm['inputs']['allow_post_in_forum_to']['type'])) { $oModuleDb = new BxDolModuleDb(); if (!$oModuleDb->getModuleByUri('forum')) { $aCustomForm['inputs']['allow_post_in_forum_to']['type'] = 'hidden'; } } parent::BxTemplFormView($aCustomForm); }
function BxMapFormPrivacy(&$oMain) { $aCustomForm = array('form_attrs' => array('name' => 'form_map_privacy', 'action' => '', 'method' => 'post'), 'params' => array('db' => array('table' => $oMain->_oConfig->getDbPrefix() . 'profiles', 'key' => 'id', 'submit_name' => 'submit_form')), 'inputs' => array('header_privacy' => array('type' => 'block_header', 'caption' => _t('_bx_map_privacy_view_location')), 'allow_view_location_to' => $oMain->_oPrivacy->getGroupChooser($oMain->_iProfileId, 'map_profiles', 'view_location'), 'Submit' => array('type' => 'submit', 'name' => 'submit_form', 'value' => _t('_Submit'), 'colspan' => true))); $aCustomForm['inputs']['allow_view_location_to']['colspan'] = true; /* if (empty($aCustomForm['inputs']['allow_view_location_to']['value']) || !$aCustomForm['inputs']['allow_view_location_to']['value']) $aCustomForm['inputs']['allow_view_location_to']['value'] = BX_MAP_DEFAULT_PRIVACY; */ parent::BxTemplFormView($aCustomForm); }
function BxDolTwigFormInviter($oMain, $sMsgNoUsers) { $aVisitorsPreapare = $oMain->_oDb->getPotentialVisitors($oMain->_iProfileId); $aVisitors = array(); foreach ($aVisitorsPreapare as $k => $r) { $aVisitors[] = array('Icon' => $GLOBALS['oFunctions']->getMemberIcon($r['ID'], 'left'), 'Link' => getProfileLink($r['ID']), 'NickName' => $r['NickName'], 'ID' => $r['ID']); } $aVars = array('bx_repeat:rows' => $aVisitors, 'msg_no_users' => $aVisitors ? '' : $sMsgNoUsers); $aCustomForm = array('form_attrs' => array('name' => 'form_inviter', 'action' => '', 'method' => 'post'), 'params' => array('db' => array('submit_name' => 'submit_form')), 'inputs' => array('inviter_users' => array('type' => 'custom', 'content' => $oMain->_oTemplate->parseHtmlByName('inviter', $aVars), 'name' => 'inviter_users', 'caption' => _t('_sys_invitation_step_select_users'), 'info' => _t('_sys_invitation_step_select_users_info'), 'required' => false, 'db' => array('pass' => 'Int')), 'inviter_emails' => array('type' => 'textarea', 'name' => 'inviter_emails', 'caption' => _t('_sys_invitation_step_additional_emails'), 'info' => _t('_sys_invitation_step_additional_emails_info'), 'db' => array('pass' => 'Xss')), 'inviter_text' => array('type' => 'textarea', 'name' => 'inviter_text', 'caption' => _t('_sys_invitation_step_invitation_text'), 'info' => _t('_sys_invitation_step_invitation_text_info'), 'db' => array('pass' => 'Xss')), 'Submit' => array('type' => 'submit', 'name' => 'submit_form', 'value' => _t('_Submit'), 'colspan' => true))); parent::BxTemplFormView($aCustomForm); }
function BxSitesFormSearch($oConfig) { $aCustomForm = array('form_attrs' => array('name' => 'form_search_events', 'action' => $oConfig->getBaseUri() . 'search', 'method' => 'post'), 'params' => array('db' => array('submit_name' => 'submit_form')), 'inputs' => array('Keyword' => array('type' => 'text', 'name' => 'Keyword', 'caption' => _t('_bx_sites_caption_keyword'), 'required' => true, 'checker' => array('func' => 'length', 'params' => array(3, 100), 'error' => _t('_bx_sites_err_keyword')), 'db' => array('pass' => 'Xss')), 'Submit' => array('type' => 'submit', 'name' => 'submit_form', 'value' => _t('_Submit'), 'colspan' => true))); parent::BxTemplFormView($aCustomForm); }
function BxDolFormMedia($aCustomForm) { parent::BxTemplFormView($aCustomForm); }
function BxOAuthFormAdd($oModule) { $aCustomForm = array('form_attrs' => array('id' => 'bx-oauth-add', 'name' => 'bx-oauth-add', 'action' => BX_DOL_URL_ROOT . $oModule->_oConfig->getBaseUri() . 'administration', 'method' => 'post'), 'params' => array('db' => array('table' => 'bx_oauth_clients', 'key' => 'id', 'submit_name' => 'client_add')), 'inputs' => array('title' => array('type' => 'text', 'name' => 'title', 'caption' => _t('_Title'), 'required' => true, 'checker' => array('func' => 'avail', 'error' => _t('_sys_adm_form_err_required_field')), 'db' => array('pass' => 'Xss')), 'redirect_uri' => array('type' => 'text', 'name' => 'redirect_uri', 'caption' => _t('_URL'), 'required' => true, 'checker' => array('func' => 'avail', 'error' => _t('_sys_adm_form_err_required_field')), 'db' => array('pass' => 'Xss')), 'Submit' => array('type' => 'submit', 'name' => 'client_add', 'value' => _t('_Submit'), 'colspan' => true))); parent::BxTemplFormView($aCustomForm); }
function BxDolAdmFormSitemap() { $aCustomForm = array('form_attrs' => array('id' => 'sys-adm-sitemap', 'name' => 'sys-adm-sitemap', 'method' => 'post'), 'inputs' => array('sys_sitemap_generated' => array('type' => 'custom', 'content' => mb_strlen(@file_get_contents(BxDolSiteMaps::getSiteMapIndexPath())) > 32 ? '<span class="sys-adm-enabled">' . _t('_Yes') . '</span>' : '<span class="sys-adm-disabled">' . _t('_No') . '</span>', 'caption' => _t('_sys_sitemap_form_caption_sitemap_generated')), 'sys_sitemap_enable' => array('type' => 'checkbox', 'name' => 'sys_sitemap_enable', 'value' => 'on', 'checked' => 'on' == getParam('sys_sitemap_enable') ? true : false, 'caption' => _t('_sys_sitemap_form_caption')), 'Submit' => array('type' => 'submit', 'name' => 'sitemap_enable', 'value' => _t('_Submit')))); parent::BxTemplFormView($aCustomForm); }
function BxDolTwigFormBroadcast($sCaptionMsgTitle, $sErrMsgTitle, $sCaptionMsgBody, $sErrMsgBory) { $aCustomForm = array('form_attrs' => array('name' => 'form_broadcast', 'action' => '', 'method' => 'post'), 'params' => array('db' => array('submit_name' => 'submit_form')), 'inputs' => array('title' => array('type' => 'text', 'name' => 'title', 'caption' => $sCaptionMsgTitle, 'required' => true, 'checker' => array('func' => 'length', 'params' => array(3, 100), 'error' => $sErrMsgTitle), 'db' => array('pass' => 'Xss')), 'message' => array('type' => 'textarea', 'name' => 'message', 'caption' => $sCaptionMsgBody, 'required' => true, 'checker' => array('func' => 'length', 'params' => array(10, 64000), 'error' => $sErrMsgBory), 'db' => array('pass' => 'Xss')), 'Submit' => array('type' => 'submit', 'name' => 'submit_form', 'value' => _t('_Submit')))); parent::BxTemplFormView($aCustomForm); }
function BxDolAdmFormDnsblRecheck($sTitle, $sId) { $aCustomForm = array('form_attrs' => array('id' => 'sys-adm-dnsbl-recheck', 'name' => 'sys-adm-dnsbl-recheck', 'onsubmit' => "return bs_sys_adm_dbsbl_recheck(\$('#{$sId}').val());", 'method' => 'post'), 'inputs' => array('test' => array('type' => 'text', 'attrs' => array('id' => $sId), 'name' => $sId, 'caption' => $sTitle, 'required' => true), 'Submit' => array('type' => 'submit', 'name' => 'dnsbl_recheck', 'value' => _t('_Submit'), 'colspan' => true))); parent::BxTemplFormView($aCustomForm); }