本文整理汇总了PHP中BxTemplStudioFormView类的典型用法代码示例。如果您正苦于以下问题:PHP BxTemplStudioFormView类的具体用法?PHP BxTemplStudioFormView怎么用?PHP BxTemplStudioFormView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BxTemplStudioFormView类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getSearchInput
public function getSearchInput()
{
bx_import('BxTemplStudioFormView');
$oForm = new BxTemplStudioFormView(array());
$aInputSearch = array('type' => 'text', 'name' => 'keyword', 'attrs' => array('id' => 'bx-grid-search-' . $this->_sObject, 'onKeyup' => 'javascript:$(this).off(\'keyup\'); ' . $this->getJsObject() . '.onChangeFilter()'));
return $oForm->genRow($aInputSearch);
}
开发者ID:blas-dmx,项目名称:trident,代码行数:7,代码来源:BxBaseStudioGridNavigation.php
示例2: getModulesSelectOne
public function getModulesSelectOne($sGetItemsMethod, $bShowCustom = true, $bShowSystem = true)
{
if (empty($sGetItemsMethod)) {
return '';
}
$oForm = new BxTemplStudioFormView(array());
$aInputModules = array('type' => 'select', 'name' => 'module', 'attrs' => array('id' => 'bx-grid-module-' . $this->_sObject, 'onChange' => 'javascript:' . $this->getJsObject() . '.onChangeModule()'), 'value' => $this->sModule, 'values' => $this->getModules($bShowCustom, $bShowSystem));
$aCounter = array();
$this->oDb->{$sGetItemsMethod}(array('type' => 'counter_by_modules'), $aCounter, false);
foreach ($aInputModules['values'] as $sKey => $sValue) {
$aInputModules['values'][$sKey] = $aInputModules['values'][$sKey] . " (" . (isset($aCounter[$sKey]) ? $aCounter[$sKey] : "0") . ")";
}
$aInputModules['values'] = array_merge(array('' => _t('_adm_txt_select_module')), $aInputModules['values']);
return $oForm->genRow($aInputModules);
}
开发者ID:blas-dmx,项目名称:trident,代码行数:15,代码来源:BxBaseStudioGrid.php
示例3: _getFilterControls
protected function _getFilterControls()
{
parent::_getFilterControls();
$sContent = "";
$oForm = new BxTemplStudioFormView(array());
$aInputModules = array('type' => 'select', 'name' => 'module', 'attrs' => array('id' => 'bx-grid-module-' . $this->_sObject, 'onChange' => 'javascript:' . $this->getJsObject() . '.onChangeFilter()'), 'value' => '', 'values' => $this->getModules(false));
$aCounter = array();
$this->oDb->getEtemplates(array('type' => 'counter_by_modules'), $aCounter, false);
foreach ($aInputModules['values'] as $sKey => $sValue) {
$aInputModules['values'][$sKey] = $aInputModules['values'][$sKey] . " (" . (isset($aCounter[$sKey]) ? $aCounter[$sKey] : "0") . ")";
}
$aInputModules['values'] = array_merge(array('' => _t('_adm_pgt_txt_all_modules')), $aInputModules['values']);
$sContent .= $oForm->genRow($aInputModules);
$aInputSearch = array('type' => 'text', 'name' => 'keyword', 'attrs' => array('id' => 'bx-grid-search-' . $this->_sObject, 'onKeyup' => 'javascript:$(this).off(\'keyup\'); ' . $this->getJsObject() . '.onChangeFilter()'));
$sContent .= $oForm->genRow($aInputSearch);
return $sContent;
}
开发者ID:blas-dmx,项目名称:trident,代码行数:17,代码来源:BxBaseStudioPolyglotEtemplates.php
示例4: getCodeEdit
protected function getCodeEdit($sAction, $sObject)
{
$aForm = $this->getFormEdit($sAction, $sObject);
$oForm = new BxTemplStudioFormView($aForm);
if ($oForm->isSubmitted() && isset($oForm->aInputs['required'])) {
$this->updateCheckerFields($oForm);
}
$oForm->initChecker();
if ($oForm->isSubmittedAndValid()) {
$sInputObject = $oForm->getCleanValue('object');
$sInputName = $oForm->getCleanValue('name');
$this->onSubmitField($oForm);
if ($oForm->update((int) $this->aField['id']) === false) {
return false;
}
return true;
} else {
return BxTemplStudioFunctions::getInstance()->popupBox('adm-form-field-edit-' . $this->aField['type'] . '-popup', _t('_adm_form_txt_field_edit_popup', _t($this->aField['caption'])), BxDolStudioTemplate::getInstance()->parseHtmlByName('form_add_field.html', array('form_id' => $aForm['form_attrs']['id'], 'form' => $oForm->getCode(true), 'object' => $sObject, 'action' => $sAction)));
}
}
开发者ID:Baloo7super,项目名称:dolphin,代码行数:20,代码来源:BxBaseStudioFormsField.php
示例5: getPageCode
public function getPageCode($sCategorySelected = '')
{
$oTemplate = BxDolStudioTemplate::getInstance();
$aCategories = array();
$iCategories = $this->oDb->getCategories(array('type' => 'by_type_name_key_name', 'type_name' => $this->sType, 'category_name' => $this->sCategory, 'hidden' => 0), $aCategories);
if ($iCategories > 0) {
$aCategories = array_keys($aCategories);
}
$bWrap = count($aCategories) > 1;
$aForm = array('form_attrs' => array('id' => 'adm-settings-form', 'name' => 'adm-settings-form', 'action' => BX_DOL_URL_STUDIO . 'settings.php?page=' . $this->sType, 'method' => 'post', 'enctype' => 'multipart/form-data', 'target' => 'adm-settings-iframe'), 'params' => array('db' => array('table' => 'sys_options', 'key' => 'id', 'uri' => '', 'uri_title' => '', 'submit_name' => 'save')), 'inputs' => array());
foreach ($aCategories as $sCategory) {
$aFields = array();
if (empty($sCategory)) {
continue;
}
$aCategory = array();
$iCategory = $this->oDb->getCategories(array('type' => 'by_name', 'value' => $sCategory), $aCategory);
if ($iCategory != 1) {
continue;
}
$aOptions = array();
$iOptions = $this->oDb->getOptions(array('type' => 'by_category_id', 'value' => $aCategory['id']), $aOptions);
foreach ($aOptions as $aOption) {
$aFields[$aOption['name']] = $this->field($aOption);
}
if ($bWrap) {
$aCategory['selected'] = $aCategory['name'] == $sCategorySelected;
$aFields = $this->header($aCategory, $aFields);
}
$aForm['inputs'] = array_merge($aForm['inputs'], $aFields);
}
$aForm['inputs'] = array_merge($aForm['inputs'], !$bWrap ? array() : array('header_save' => array('type' => 'block_header')), array('categories' => array('type' => 'hidden', 'name' => 'categories', 'value' => implode(',', $aCategories), 'db' => array('pass' => 'Xss')), 'save' => array('type' => 'submit', 'name' => 'save', 'value' => _t("_adm_btn_settings_save"))));
$oForm = new BxTemplStudioFormView($aForm);
$oForm->initChecker();
if ($oForm->isSubmittedAndValid()) {
echo $this->saveChanges($oForm);
exit;
}
return $oTemplate->parseHtmlByName('settings.html', array('js_object' => $this->getPageJsObject(), 'form' => $oForm->getCode()));
}
开发者ID:Baloo7super,项目名称:dolphin,代码行数:40,代码来源:BxBaseStudioSettings.php
示例6: _getFilterControls
protected function _getFilterControls()
{
bx_import('BxTemplStudioFormView');
$oForm = new BxTemplStudioFormView(array());
$aInput = array('type' => 'text', 'name' => 'keyword', 'attrs' => array('id' => 'bx-grid-search-' . $this->_sObject));
$this->_oTemplate->addCss('forms.css');
return $oForm->genRow($aInput);
}
开发者ID:Baloo7super,项目名称:dolphin,代码行数:8,代码来源:BxBaseGrid.php
示例7: _getFilterControls
protected function _getFilterControls()
{
parent::_getFilterControls();
$sContent = "";
bx_import('BxTemplStudioFormView');
$oForm = new BxTemplStudioFormView(array());
$aInputLevels = array('type' => 'select', 'name' => 'level', 'attrs' => array('id' => 'bx-grid-level-' . $this->_sObject, 'onChange' => 'javascript:' . $this->getJsObject() . '.onChangeLevel()'), 'value' => 'id-' . $this->iLevel, 'values' => array());
$aLevels = $aCounter = array();
$this->oDb->getLevels(array('type' => 'all'), $aLevels, false);
$this->oDb->getPrices(array('type' => 'counter_by_levels'), $aCounter, false);
foreach ($aLevels as $aLevel) {
$aInputLevels['values']['id-' . $aLevel['id']] = _t($aLevel['name']) . " (" . (isset($aCounter[$aLevel['id']]) ? $aCounter[$aLevel['id']] : "0") . ")";
}
asort($aInputLevels['values']);
$aInputLevels['values'] = array_merge(array('id-0' => _t('_adm_prm_txt_select_level')), $aInputLevels['values']);
$sContent .= $oForm->genRow($aInputLevels);
if ($this->iLevel == 0) {
return $sContent;
}
$aInputSearch = array('type' => 'text', 'name' => 'keyword', 'attrs' => array('id' => 'bx-grid-search-' . $this->_sObject));
$sContent .= $oForm->genRow($aInputSearch);
return $sContent;
}
开发者ID:Baloo7super,项目名称:dolphin,代码行数:23,代码来源:BxBaseStudioPermissionsPrices.php
示例8: _getFilterControls
protected function _getFilterControls()
{
parent::_getFilterControls();
$sContent = $this->getModulesSelectOne('getValues') . $this->getListsSelector($this->sModule);
$oForm = new BxTemplStudioFormView(array());
$aInputSearch = array('type' => 'text', 'name' => 'keyword', 'attrs' => array('id' => 'bx-grid-search-' . $this->_sObject), 'tr_attrs' => array('style' => 'display:none;'));
$sContent .= $oForm->genRow($aInputSearch);
return $sContent;
}
开发者ID:blas-dmx,项目名称:trident,代码行数:9,代码来源:BxBaseStudioFormsPreValues.php
示例9: getSettingsCache
protected function getSettingsCache($aPage, $bCreate = true, $bInputsOnly = false)
{
$aForm = array('form_attrs' => array('id' => 'adm-bp-settings-cache'), 'params' => array('remove_form' => '1', 'csrf' => array('disable' => true)), 'inputs' => parent::getSettingsCache($aPage, $bCreate, true));
unset($aForm['inputs']['cache_lifetime']['attrs']);
$aForm['inputs']['cache_editable'] = array('type' => 'switcher', 'name' => 'cache_editable', 'caption' => _t('_bx_dev_bp_txt_page_cache_editable'), 'info' => '', 'value' => '1', 'checked' => (int) $this->aPageRebuild['cache_editable'] == 1, 'required' => '', 'db' => array('pass' => 'Int'));
if ($bInputsOnly) {
return $aForm['inputs'];
}
$oForm = new BxTemplStudioFormView($aForm);
return $oForm->getCode();
}
开发者ID:Baloo7super,项目名称:dolphin,代码行数:11,代码来源:BxDevBuilderPage.php
示例10: getCover
protected function getCover()
{
$oTemplate = BxDolStudioTemplate::getInstance();
$aForm = array('form_attrs' => array('id' => $this->sCoverFormId, 'name' => $this->sCoverFormId, 'action' => BX_DOL_URL_STUDIO . 'designer.php', 'method' => 'post', 'enctype' => 'multipart/form-data', 'target' => $this->sCoverIframeId), 'params' => array('db' => array('table' => '', 'key' => '', 'uri' => '', 'uri_title' => '', 'submit_name' => 'save')), 'inputs' => array('page' => array('type' => 'hidden', 'name' => 'page', 'value' => $this->sPage), 'enabled' => array('type' => 'checkbox', 'name' => 'enabled', 'caption' => _t('_adm_dsg_txt_cover_enabled'), 'value' => 'on', 'checked' => getParam('sys_site_cover_enabled') == 'on', 'db' => array('pass' => 'Xss')), 'code' => array('type' => 'textarea', 'name' => 'code', 'caption' => '', 'value' => getParam('sys_site_cover_code'), 'db' => array('pass' => 'XssHtml')), 'save' => array('type' => 'submit', 'name' => 'save', 'value' => _t('_adm_btn_designer_submit'))));
$oForm = new BxTemplStudioFormView($aForm, $oTemplate);
$oForm->initChecker();
if ($oForm->isSubmittedAndValid()) {
echo $this->submitCover($oForm);
exit;
}
$oTemplate->addJs(array('codemirror/lib/codemirror.js', 'codemirror/mode/xml/xml.js', 'codemirror/mode/javascript/javascript.js', 'codemirror/mode/css/css.js', 'codemirror/mode/htmlmixed/htmlmixed.js'));
$oTemplate->addCss(BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'codemirror/lib/|codemirror.css');
return $oTemplate->parseHtmlByName('designer.html', array('js_object' => $this->getPageJsObject(), 'content' => $this->getBlockCode(array('items' => $oTemplate->parseHtmlByName('dsr_cover.html', array('warning' => MsgBox(_t('_adm_dsg_dsc_cover_warning')), 'cover_iframe_id' => $this->sCoverIframeId, 'form' => $oForm->getCode()))))));
}
开发者ID:blas-dmx,项目名称:trident,代码行数:14,代码来源:BxBaseStudioDesigner.php
示例11: _getFilterControls
protected function _getFilterControls()
{
parent::_getFilterControls();
$sContent = "";
$oForm = new BxTemplStudioFormView(array());
$aInputLevels = array('type' => 'select', 'name' => 'level', 'attrs' => array('id' => 'bx-grid-level-' . $this->_sObject, 'onChange' => 'javascript:' . $this->getJsObject() . '.onChangeLevel()'), 'value' => 'id-' . $this->iLevel, 'values' => array());
$aLevels = $aCounter = array();
$this->oDb->getLevels(array('type' => 'all'), $aLevels, false);
$this->oDb->getActions(array('type' => 'counter_by_levels'), $aCounter, false);
foreach ($aLevels as $aLevel) {
$aInputLevels['values']['id-' . $aLevel['id']] = _t($aLevel['name']) . " (" . (isset($aCounter[$aLevel['id']]) ? $aCounter[$aLevel['id']] : "0") . ")";
}
asort($aInputLevels['values']);
$aInputLevels['values'] = array_merge(array('id-0' => _t('_adm_prm_txt_select_level')), $aInputLevels['values']);
$sContent .= $oForm->genRow($aInputLevels);
if ($this->iLevel == 0) {
return $sContent;
}
$aInputModules = array('type' => 'select', 'name' => 'module', 'attrs' => array('id' => 'bx-grid-module-' . $this->_sObject, 'onChange' => 'javascript:' . $this->getJsObject() . '.onChangeFilter()'), 'value' => '', 'values' => $this->getModules(false));
$aInputModules['values'] = array_merge(array('' => _t('_adm_prm_txt_all_modules')), $aInputModules['values']);
$aCounter = array();
$this->oDb->getActions(array('type' => 'counter_by_modules'), $aCounter, false);
foreach ($aInputModules['values'] as $sKey => $sValue) {
if (isset($aCounter[$sKey])) {
$aInputModules['values'][$sKey] = $aInputModules['values'][$sKey] . " (" . $aCounter[$sKey] . ")";
}
}
$sContent .= $oForm->genRow($aInputModules);
$aInputSearch = array('type' => 'text', 'name' => 'keyword', 'attrs' => array('id' => 'bx-grid-search-' . $this->_sObject, 'onKeyup' => 'javascript:$(this).off(\'keyup\'); ' . $this->getJsObject() . '.onChangeFilter()'));
$sContent .= $oForm->genRow($aInputSearch);
return $sContent;
}
开发者ID:blas-dmx,项目名称:trident,代码行数:32,代码来源:BxBaseStudioPermissionsActions.php
示例12: _addJsCss
protected function _addJsCss()
{
parent::_addJsCss();
$this->_oTemplate->addJs(array('jquery.form.min.js', 'navigation_menus.js'));
bx_import('BxTemplStudioFormView');
$oForm = new BxTemplStudioFormView(array());
$oForm->addCssJs();
}
开发者ID:Baloo7super,项目名称:dolphin,代码行数:8,代码来源:BxBaseStudioNavigationMenus.php
示例13: performActionExport
public function performActionExport()
{
$sContentInsert = $sContentDelete = "";
$aIds = bx_get('ids');
if (!$aIds || !is_array($aIds)) {
$iId = (int) bx_get('id');
if (!$iId) {
$this->_echoResultJson(array());
exit;
}
$aIds = array($iId);
}
$iId = $aIds[0];
$aList = array();
$this->oDb->getLists(array('type' => 'by_id', 'value' => $iId), $aList, false);
if (!is_array($aList) || empty($aList)) {
$this->_echoResultJson(array());
exit;
}
$sContentInsert .= $this->oModule->_oDb->getQueryInsert('sys_form_pre_lists', array($aList), "Dumping data for '" . $aList['key'] . "' data list");
$sContentDelete .= $this->oModule->_oDb->getQueryDelete('sys_form_pre_lists', 'key', array($aList), "Deleting data for '" . $aList['key'] . "' data list");
$aValues = array();
$this->oDb->getValues(array('type' => 'by_key', 'value' => $aList['key']), $aValues, false);
$sContentInsert .= $this->oModule->_oDb->getQueryInsert('sys_form_pre_values', $aValues, false, array('id', 'key', 'value', 'lkey', 'lkey2', 'order'));
$sContentDelete .= $this->oModule->_oDb->getQueryDelete('sys_form_pre_values', 'Key', array(array('Key' => $aList['key'])), false);
$aFormStructure = array('form_attrs' => array(), 'inputs' => array('insert' => array('type' => 'textarea', 'name' => 'insert', 'caption' => _t('_bx_dev_frm_txt_prelists_export_insert'), 'value' => $sContentInsert), 'delete' => array('type' => 'textarea', 'name' => 'delete', 'caption' => _t('_bx_dev_frm_txt_prelists_export_delete'), 'value' => $sContentDelete), 'done' => array('type' => 'button', 'name' => 'done', 'value' => _t('_bx_dev_frm_btn_prelists_done'), 'attrs' => array('onclick' => "\$('.bx-popup-applied:visible').dolPopupHide()"))));
$oForm = new BxTemplStudioFormView($aFormStructure);
bx_import('BxTemplStudioFunctions');
$sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-dev-frm-prelist-export-popup', _t('_bx_dev_frm_txt_prelists_export_popup', _t($aList['title'])), $this->oModule->_oTemplate->parseHtmlByName('form_export.html', array('content' => $oForm->getCode())));
$this->_echoResultJson(array('popup' => $sContent), true);
}
开发者ID:blas-dmx,项目名称:trident,代码行数:31,代码来源:BxDevFormsPreLists.php
示例14: _getFilterControls
protected function _getFilterControls()
{
parent::_getFilterControls();
$sContent = "";
$oForm = new BxTemplStudioFormView(array());
$aInputModules = array('type' => 'select', 'name' => 'module', 'attrs' => array('id' => 'bx-grid-module-' . $this->_sObject, 'onChange' => 'javascript:' . $this->getJsObject() . '.onChangeFilter()'), 'values' => array('id-' . BX_DOL_LANGUAGE_CATEGORY_SYSTEM => '', 'id-' . BX_DOL_LANGUAGE_CATEGORY_CUSTOM => ''));
$aCategories = $aCounter = array();
$this->oDb->getCategoriesBy(array('type' => 'all'), $aCategories, false);
$this->oDb->getKeysBy(array('type' => 'counter_by_category'), $aCounter, false);
foreach ($aCategories as $aCategory) {
$aInputModules['values']['id-' . $aCategory['id']] = $aCategory['name'] . " (" . (isset($aCounter[$aCategory['id']]) ? $aCounter[$aCategory['id']] : "0") . ")";
}
$aInputModules['values'] = array_merge(array('id-0' => _t('_adm_pgt_txt_all_modules')), $aInputModules['values']);
$sContent .= $oForm->genRow($aInputModules);
$aInputSearch = array('type' => 'text', 'name' => 'keyword', 'attrs' => array('id' => 'bx-grid-search-' . $this->_sObject, 'onKeyup' => 'javascript:$(this).off(); ' . $this->getJsObject() . '.onChangeFilter()'));
$sContent .= $oForm->genRow($aInputSearch);
return $sContent;
}
开发者ID:blas-dmx,项目名称:trident,代码行数:18,代码来源:BxBaseStudioPolyglotKeys.php
示例15: _getTmplVarsBlockPanelTop
protected function _getTmplVarsBlockPanelTop()
{
$sJsObject = $this->getPageJsObject();
$oForm = new BxTemplStudioFormView(array());
$aInputPages = array('type' => 'select', 'name' => 'page', 'attrs' => array('onChange' => 'javascript:' . $this->getPageJsObject() . '.onChangePage(this)'), 'value' => $this->sPage, 'values' => array(array('key' => '', 'value' => _t('_adm_bp_txt_select_page'))));
$aPages = $aCounter = array();
$this->oDb->getPages(array('type' => 'by_module', 'value' => $this->sType), $aPages, false);
$this->oDb->getBlocks(array('type' => 'counter_by_pages'), $aCounter, false);
foreach ($aPages as $aPage) {
$aInputPages['values'][] = array('key' => $aPage['object'], 'value' => _t($aPage['title_system']) . " (" . (isset($aCounter[$aPage['object']]) ? $aCounter[$aPage['object']] : "0") . ")");
}
$aTmplVarsActions = array();
if (($this->sPage != '' && !empty($this->aPageRebuild)) !== false) {
$aTmplVarsActions = $this->_getTmplVarsBlockPanelTopActions();
}
return array('js_object' => $this->getPageJsObject(), 'selector' => $oForm->genRow($aInputPages), 'action_page_create' => $this->sActionPageCreate, 'bx_if:show_actions' => array('condition' => $this->sPage != '', 'content' => $aTmplVarsActions));
}
开发者ID:blas-dmx,项目名称:trident,代码行数:17,代码来源:BxBaseStudioBuilderPage.php
示例16: _getFilterControls
protected function _getFilterControls()
{
parent::_getFilterControls();
bx_import('BxTemplStudioFormView');
$oForm = new BxTemplStudioFormView(array());
$aInputSets = array('type' => 'select', 'name' => 'set', 'attrs' => array('id' => 'bx-grid-set-' . $this->_sObject, 'onChange' => 'javascript:' . $this->getJsObject() . '.onChangeFilter()'), 'value' => '', 'values' => array());
$aSets = $aCounter = array();
$this->oDb->getSets(array('type' => 'all', 'except' => $this->sSet), $aSets, false);
$this->oDb->getItems(array('type' => 'counter_by_sets'), $aCounter, false);
foreach ($aSets as $aSet) {
$aInputSets['values'][$aSet['name']] = _t($aSet['title']) . " (" . (isset($aCounter[$aSet['name']]) ? $aCounter[$aSet['name']] : "0") . ")";
}
asort($aInputSets['values']);
$aInputSets['values'] = array_merge(array('' => _t('_adm_nav_txt_select_set')), $aInputSets['values']);
return $oForm->genRow($aInputSets) . $this->getModulesSelectAll('getItems') . $this->getSearchInput();
}
开发者ID:blas-dmx,项目名称:trident,代码行数:16,代码来源:BxBaseStudioNavigationImport.php
示例17: getPageCaptionActions
protected function getPageCaptionActions()
{
if (empty($this->aActions)) {
return "";
}
$aForm = array('form_attrs' => array('id' => 'adm-page-actions', 'name' => 'adm-page-actions', 'action' => '', 'method' => 'post'), 'params' => array(), 'inputs' => array());
foreach ($this->aActions as $aAction) {
$aInput = array('type' => $aAction['type'], 'name' => $aAction['name'], 'caption' => _t($aAction['caption']));
switch ($aAction['type']) {
case 'switcher':
$aInput['checked'] = $aAction['checked'];
$aInput['attrs']['onchange'] = $aAction['onchange'];
break;
}
$aForm['inputs'][$aInput['name']] = $aInput;
}
$oForm = new BxTemplStudioFormView($aForm);
return BxDolStudioTemplate::getInstance()->parseHtmlByName('page_caption_actions.html', array('content' => $oForm->getCode()));
}
开发者ID:blas-dmx,项目名称:trident,代码行数:19,代码来源:BxBaseStudioPage.php
示例18: _addJsCss
protected function _addJsCss()
{
parent::_addJsCss();
$this->_oTemplate->addJs(array('jquery.form.min.js', 'permissions_levels.js'));
$oForm = new BxTemplStudioFormView(array());
$oForm->addCssJs();
}
开发者ID:blas-dmx,项目名称:trident,代码行数:7,代码来源:BxBaseStudioPermissionsLevels.php
示例19: performActionExport
public function performActionExport()
{
$sContentInsert = $sContentDelete = "";
$aForm = $this->_getItem('getForms');
if ($aForm === false) {
$this->_echoResultJson(array());
exit;
}
$sContentInsert .= $this->oModule->_oDb->getQueryInsert('sys_objects_form', array($aForm), "Dumping data for '" . $aForm['object'] . "' form");
$sContentDelete .= $this->oModule->_oDb->getQueryDelete('sys_objects_form', 'object', array($aForm), "Deleting data for '" . $aForm['object'] . "' form");
$aDisplays = array();
$this->oDb->getDisplays(array('type' => 'by_object', 'value' => $aForm['object']), $aDisplays, false);
$sContentInsert .= $this->oModule->_oDb->getQueryInsert('sys_form_displays', $aDisplays, false, array('id', 'name'));
$sContentDelete .= $this->oModule->_oDb->getQueryDelete('sys_form_displays', 'object', array($aForm), false);
$aFields = array();
$this->oDb->getInputs(array('type' => 'dump_inputs', 'value' => $aForm['object']), $aFields, false);
$sContentInsert .= $this->oModule->_oDb->getQueryInsert('sys_form_inputs', $aFields);
$sContentDelete .= $this->oModule->_oDb->getQueryDelete('sys_form_inputs', 'object', array($aForm), false);
$aConnections = array();
$this->oDb->getInputs(array('type' => 'dump_connections', 'value' => $aForm['object']), $aConnections, false);
$sContentInsert .= $this->oModule->_oDb->getQueryInsert('sys_form_display_inputs', $aConnections);
$sContentDelete .= $this->oModule->_oDb->getQueryDelete('sys_form_display_inputs', 'display_name', $aDisplays);
$aFormStructure = array('form_attrs' => array(), 'inputs' => array('insert' => array('type' => 'textarea', 'name' => 'insert', 'caption' => _t('_bx_dev_frm_txt_forms_export_insert'), 'value' => $sContentInsert), 'delete' => array('type' => 'textarea', 'name' => 'delete', 'caption' => _t('_bx_dev_frm_txt_forms_export_delete'), 'value' => $sContentDelete), 'done' => array('type' => 'button', 'name' => 'done', 'value' => _t('_bx_dev_frm_btn_forms_done'), 'attrs' => array('onclick' => "\$('.bx-popup-applied:visible').dolPopupHide()"))));
$oForm = new BxTemplStudioFormView($aFormStructure);
bx_import('BxTemplStudioFunctions');
$sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-dev-frm-form-export-popup', _t('_bx_dev_frm_txt_forms_export_popup', _t($aForm['title'])), $this->oModule->_oTemplate->parseHtmlByName('form_export.html', array('content' => $oForm->getCode())));
$this->_echoResultJson(array('popup' => $sContent), true);
}
开发者ID:Baloo7super,项目名称:dolphin,代码行数:28,代码来源:BxDevFormsForms.php
示例20: performActionExport
public function performActionExport()
{
$sContentInsert = $sContentDelete = "";
$aMenu = $this->_getItem('getMenus');
if ($aMenu === false) {
$this->_echoResultJson(array());
exit;
}
$sContentInsert .= $this->oModule->_oDb->getQueryInsert('sys_objects_menu', array($aMenu), "Dumping data for '" . $aMenu['object'] . "' menu");
$sContentDelete .= $this->oModule->_oDb->getQueryDelete('sys_objects_menu', 'object', array($aMenu), "Deleting data for '" . $aMenu['object'] . "' menu");
$aSet = array();
$this->oDb->getSets(array('type' => 'dump_by_name', 'value' => $aMenu['set_name']), $aSet, false);
$sContentInsert .= $this->oModule->_oDb->getQueryInsert('sys_menu_sets', array($aSet), false, array('name'));
$sContentDelete .= $this->oModule->_oDb->getQueryDelete('sys_menu_sets', 'set_name', array($aSet), false);
$aItems = array();
$this->oDb->getItems(array('type' => 'by_set_name', 'value' => $aMenu['set_name']), $aItems, false);
$sContentInsert .= $this->oModule->_oDb->getQueryInsert('sys_menu_items', $aItems);
$sContentDelete .= $this->oModule->_oDb->getQueryDelete('sys_menu_items', 'set_name', array($aSet), false);
$aFormStructure = array('form_attrs' => array(), 'inputs' => array('insert' => array('type' => 'textarea', 'name' => 'insert', 'caption' => _t('_bx_dev_nav_txt_menus_export_insert'), 'value' => $sContentInsert), 'delete' => array('type' => 'textarea', 'name' => 'delete', 'caption' => _t('_bx_dev_nav_txt_menus_export_delete'), 'value' => $sContentDelete), 'done' => array('type' => 'button', 'name' => 'done', 'value' => _t('_bx_dev_nav_btn_menus_done'), 'attrs' => array('onclick' => "\$('.bx-popup-applied:visible').dolPopupHide()"))));
$oForm = new BxTemplStudioFormView($aFormStructure);
bx_import('BxTemplStudioFunctions');
$sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-dev-nav-menu-export-popup', _t('_bx_dev_nav_txt_menus_export_popup', _t($aMenu['title'])), $this->oModule->_oTemplate->parseHtmlByName('nav_export.html', array('content' => $oForm->getCode())));
$this->_echoResultJson(array('popup' => $sContent), true);
}
开发者ID:blas-dmx,项目名称:trident,代码行数:24,代码来源:BxDevNavigationMenus.php
注:本文中的BxTemplStudioFormView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论