function __construct() { $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::__construct($aCustomForm); }
function __construct($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::__construct($this->_aCustomForm); }
function __construct() { 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::__construct($aCustomForm); }
function __construct($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::__construct($aCustomForm); }
function __construct($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' => getNickName($r['ID']), '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')))); parent::__construct($aCustomForm); }
public function __construct($aInfo, $oTemplate) { parent::__construct($aInfo, $oTemplate); $aNoRelocatePages = array('forgot-password', 'login', 'create-account', 'logout'); $sRelocate = bx_process_input(bx_get('relocate')); if (!$sRelocate && isset($_SERVER['HTTP_REFERER']) && 0 === mb_stripos($_SERVER['HTTP_REFERER'], BX_DOL_URL_ROOT)) { $sRelocate = $_SERVER['HTTP_REFERER']; foreach ($aNoRelocatePages as $s) { if (false !== mb_stripos($_SERVER['HTTP_REFERER'], $s)) { $sRelocate = BX_DOL_URL_ROOT . 'member.php'; break; } } } $this->aInputs['relocate']['value'] = $sRelocate ? $sRelocate : BX_DOL_URL_ROOT . 'member.php'; }
/** * Constructor * @param $sName the name of form field from main form, where this nested form is inserted. * @param $aForm form array, actually only form inout are needed, all other attributes are taken from parent form automatically. * @param $sSubmitName main form submit_name; field name of submit form input to determine if form is submitted or not. * @param $oTemplate optional template object */ function __construct($sName, $aForm, $sSubmitName = false, $oTemplate = false) { if (!isset($aForm['params']['nested_form_template']) || !$aForm['params']['nested_form_template']) { $aForm['params']['nested_form_template'] = 'uploader_nested_form_wrapper.html'; } $aForm['form_attrs']['id'] = $sName . '_{file_id}'; $aForm['form_attrs']['method'] = 'specific'; $aForm['params']['remove_form'] = true; $aForm['params']['csrf']['disable'] = true; if ($sSubmitName) { $aForm['params']['db']['submit_name'] = $sSubmitName; } if (!isset($aForm['inputs'][$sName])) { $aForm['inputs'][$sName] = array('type' => 'hidden', 'name' => $sName . '[]', 'value' => '{file_id}'); } parent::__construct($aForm, $oTemplate); }
public function __construct($aInfo, $oTemplate) { parent::__construct($aInfo, $oTemplate); $this->_sStorageObject = 'sys_cmts_images'; $this->_sTranscoderPreview = 'sys_cmts_images_preview'; $this->_aImageUploaders = array('sys_cmts_simple'); if (isset($this->aInputs['cmt_image'])) { $aFormNested = array('params' => array('nested_form_template' => 'comments_uploader_nfw.html'), 'inputs' => array()); $oFormNested = new BxDolFormNested('cmt_image', $aFormNested, 'cmt_submit'); $this->aInputs['cmt_image']['storage_object'] = $this->_sStorageObject; $this->aInputs['cmt_image']['images_transcoder'] = $this->_sTranscoderPreview; $this->aInputs['cmt_image']['uploaders'] = $this->_aImageUploaders; $this->aInputs['cmt_image']['upload_buttons_titles'] = array('Simple' => 'camera'); $this->aInputs['cmt_image']['multiple'] = true; $this->aInputs['cmt_image']['ghost_template'] = $oFormNested; } }
function __construct($oTemplate = false) { $aInfo = array('form_attrs' => array('id' => 'sys-splash-domain'), 'params' => array('db' => array('submit_name' => 'domain_submit')), 'inputs' => array('domain' => array('type' => 'domain', 'name' => 'domain', 'value' => '', 'value_postfix' => _t('_sys_splash_inp_postfix'), 'value_button' => _t('_sys_splash_btn_start'), 'attrs' => array('placeholder' => _t('_sys_splash_inp_placeholder')), 'db' => array('pass' => 'Xss'), 'checker' => array('func' => 'preg', 'params' => array('/^[a-z0-9-]{3,}$/'), 'error' => _t('_sys_splash_err_domain_incorrect'))))); parent::__construct($aInfo, $oTemplate); }
function __construct($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::__construct($aCustomForm); }
public function __construct($aInfo, $oTemplate) { parent::__construct($aInfo, $oTemplate); }
function __construct($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::__construct($aCustomForm); }
function __construct($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::__construct($aCustomForm); }
function __construct() { $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::__construct($aCustomForm); }
public function __construct($aInfo, $oTemplate = false) { parent::__construct($aInfo, $oTemplate); $this->_oModule = BxDolModule::getInstance($this->MODULE); }
function __construct($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')))); parent::__construct($aCustomForm); }
public function __construct($aInfo, $oTemplate) { parent::__construct($aInfo, $oTemplate); $this->_bSetPendingApproval = !(bool) getParam('sys_account_autoapproval'); }
function __construct($oModule) { $aCustomForm = array('form_attrs' => array('id' => 'bx-oauth-add', 'name' => 'bx-oauth-add', 'action' => BX_DOL_URL_ROOT . 'grid.php?' . bx_encode_url_params($_GET, array('ids', '_r')), '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('_bx_oauth_client_url'), 'required' => true, 'checker' => array('func' => 'avail', 'error' => _t('_sys_adm_form_err_required_field')), 'db' => array('pass' => 'Xss')), 'Submit' => array('type' => 'input_set', 0 => array('type' => 'submit', 'name' => 'client_add', 'value' => _t('_Submit')), 1 => array('type' => 'reset', 'name' => 'close', 'value' => _t('Close'), 'attrs' => array('onclick' => "\$('.bx-popup-active').dolPopupHide()", 'class' => 'bx-def-margin-sec-left'))))); parent::__construct($aCustomForm); }