当前位置: 首页>>代码示例>>PHP>>正文


PHP HTMLForm::display方法代码示例

本文整理汇总了PHP中HTMLForm::display方法的典型用法代码示例。如果您正苦于以下问题:PHP HTMLForm::display方法的具体用法?PHP HTMLForm::display怎么用?PHP HTMLForm::display使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HTMLForm的用法示例。


在下文中一共展示了HTMLForm::display方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 public function execute(HTTPRequestCustom $request)
 {
     $this->init();
     $this->build_form();
     $tpl = new StringTemplate('# INCLUDE MSG # # INCLUDE FORM #');
     $tpl->add_lang($this->lang);
     if ($this->submit_button->has_been_submited() && $this->form->validate()) {
         $this->save();
         $this->form->get_field_by_id('admin_alerts_levels')->set_hidden(!$this->config->are_admin_alerts_enabled());
         $this->form->get_field_by_id('admin_alerts_fix_action')->set_hidden(!$this->config->are_admin_alerts_enabled());
         foreach ($this->config->get_status_list() as $key => $value) {
             $this->form->get_field_by_id($key)->set_hidden(!$this->config->is_progress_bar_displayed());
         }
         $this->form->get_field_by_id('stats_top_posters_enabled')->set_hidden(!$this->config->are_stats_enabled());
         $this->form->get_field_by_id('stats_top_posters_number')->set_hidden(!$this->config->are_stats_top_posters_enabled());
         $this->form->get_field_by_id('pm_edit_enabled')->set_hidden(!$this->config->are_pm_enabled());
         $this->form->get_field_by_id('pm_delete_enabled')->set_hidden(!$this->config->are_pm_enabled());
         $this->form->get_field_by_id('pm_comment_enabled')->set_hidden(!$this->config->are_pm_enabled());
         $this->form->get_field_by_id('pm_in_progress_enabled')->set_hidden(!$this->config->are_pm_enabled());
         $this->form->get_field_by_id('pm_pending_enabled')->set_hidden(!$this->config->are_pm_enabled());
         $this->form->get_field_by_id('pm_assign_enabled')->set_hidden(!$this->config->are_pm_enabled());
         $this->form->get_field_by_id('pm_fix_enabled')->set_hidden(!$this->config->are_pm_enabled());
         $this->form->get_field_by_id('pm_reject_enabled')->set_hidden(!$this->config->are_pm_enabled());
         $this->form->get_field_by_id('pm_reopen_enabled')->set_hidden(!$this->config->are_pm_enabled());
         $this->form->get_field_by_id('types_table')->set_value($this->build_types_table()->render());
         $this->form->get_field_by_id('categories_table')->set_value($this->build_categories_table()->render());
         $this->form->get_field_by_id('severities_table')->set_value($this->build_severities_table()->render());
         $this->form->get_field_by_id('priorities_table')->set_value($this->build_priorities_table()->render());
         $this->form->get_field_by_id('versions_table')->set_value($this->build_versions_table()->render());
         $tpl->put('MSG', MessageHelper::display(LangLoader::get_message('message.success.config', 'status-messages-common'), MessageHelper::SUCCESS, 5));
     }
     $tpl->put('FORM', $this->form->display());
     return new AdminBugtrackerDisplayResponse($tpl, $this->lang['titles.admin.module_config']);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:34,代码来源:AdminBugtrackerConfigController.class.php

示例2: execute

    public function execute(HTTPRequestCustom $request)
    {
        $this->init();
        $this->build_form();
        $this->tpl = new StringTemplate('
				# INCLUDE MSG #
				# INCLUDE FORM #
				<script>
				<!--
					jQuery(document).ready(function() {
						' . $this->get_events_select_type() . '
					});
				-->
				</script>');
        $this->tpl->add_lang($this->lang);
        if ($this->submit_button->has_been_submited() && $this->form->validate()) {
            $extended_field = $this->save();
            $error = ExtendedFieldsService::get_error();
            if (!empty($error)) {
                $this->tpl->put('MSG', MessageHelper::display($error, MessageHelper::ERROR, 5));
            } else {
                AppContext::get_response()->redirect(AdminExtendedFieldsUrlBuilder::fields_list(), StringVars::replace_vars($this->lang['message.success.add'], array('name' => $extended_field->get_name())));
            }
        }
        $this->tpl->put('FORM', $this->form->display());
        return new AdminExtendedFieldsDisplayResponse($this->tpl, $this->lang['extended-field-add']);
    }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:27,代码来源:AdminExtendedFieldMemberAddController.class.php

示例3: execute

 public function execute(HTTPRequestCustom $request)
 {
     $this->load_lang();
     $id_theme = $request->get_value('id_theme', '');
     $id_module = '';
     $file_selected = $request->get_value('file_name', '');
     if (preg_match('`/`', $file_selected)) {
         $split = explode('/', $file_selected);
         $id_module = $split[0];
         $file_name = $split[1] . '.tpl';
     } else {
         $file_name = $file_selected . '.tpl';
     }
     $this->build_form($id_theme, $id_module, $file_name, $file_selected);
     $tpl = new StringTemplate('# INCLUDE MSG # # INCLUDE FORM #');
     $tpl->add_lang($this->lang);
     if (!empty($id_theme) && !empty($file_selected)) {
         if ($this->submit_button->has_been_submited() && $this->form->validate()) {
             $this->save();
             $tpl->put('MSG', MessageHelper::display(LangLoader::get_message('process.success', 'status-messages-common'), MessageHelper::SUCCESS, 4));
         }
     }
     $tpl->put('FORM', $this->form->display());
     return new AdminCustomizationDisplayResponse($tpl, $this->lang['customization.editor.tpl-files']);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:25,代码来源:AdminCustomizeEditorTPLFilesController.class.php

示例4: execute

    public function execute(HTTPRequestCustom $request)
    {
        $id = $request->get_getint('id');
        $this->init();
        $extended_field = new ExtendedField();
        $extended_field->set_id($id);
        $exist_field = ExtendedFieldsDatabaseService::check_field_exist_by_id($extended_field);
        if ($exist_field) {
            $this->extended_field = ExtendedFieldsCache::load()->get_extended_field($id);
            $this->build_form($request);
        } else {
            $error_controller = PHPBoostErrors::unexisting_page();
            DispatchManager::redirect($error_controller);
        }
        $this->tpl = new StringTemplate('# INCLUDE MSG #
				# INCLUDE FORM #
				<script>
				jQuery(document).ready(function() {
				' . $this->get_events_select_type() . '});
				</script>');
        $this->tpl->add_lang($this->lang);
        $this->tpl->put_all(array('FIELD_TYPE' => $this->extended_field['field_type']));
        if ($this->submit_button->has_been_submited() && $this->form->validate()) {
            $extended_field = $this->save($id);
            $error = ExtendedFieldsService::get_error();
            if (!empty($error)) {
                $this->tpl->put('MSG', MessageHelper::display($error, MessageHelper::ERROR, 5));
            } else {
                AppContext::get_response()->redirect($this->form->get_value('referrer') ? $this->form->get_value('referrer') : AdminExtendedFieldsUrlBuilder::fields_list(), StringVars::replace_vars($this->lang['message.success.edit'], array('name' => $extended_field->get_name())));
            }
        }
        $this->tpl->put('FORM', $this->form->display());
        return new AdminExtendedFieldsDisplayResponse($this->tpl, $this->lang['extended-field-edit']);
    }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:34,代码来源:AdminExtendedFieldMemberEditController.class.php

示例5: execute

 public function execute(HTTPRequestCustom $request)
 {
     $this->load_lang();
     $this->load_config();
     $theme = $request->get_value('theme', 'all');
     if ($theme !== 'all' && !ThemesManager::get_theme_existed($theme)) {
         AppContext::get_response()->redirect(AdminCustomizeUrlBuilder::customize_interface());
     }
     $this->build_form($theme);
     $tpl = new StringTemplate('# INCLUDE MSG # # INCLUDE FORM #');
     $tpl->add_lang($this->lang);
     if ($this->submit_button->has_been_submited() && $this->form->validate()) {
         $header_logo = $this->form->get_value('header_logo', null);
         if ($header_logo !== null) {
             $file_type = new FileType(new File($header_logo->get_name()));
             if ($file_type->is_picture()) {
                 $this->save($header_logo, $theme);
                 AppContext::get_response()->redirect(AdminCustomizeUrlBuilder::customize_interface());
             } else {
                 $tpl->put('MSG', MessageHelper::display(LangLoader::get_message('process.error', 'status-messages-common'), MessageHelper::ERROR, 4));
             }
         } elseif ($this->form->get_value('use_default_logo')) {
             $this->delete_pictures_saved($theme);
             AppContext::get_response()->redirect(AdminCustomizeUrlBuilder::customize_interface());
         } else {
             $tpl->put('MSG', MessageHelper::display(LangLoader::get_message('process.error', 'status-messages-common'), MessageHelper::ERROR, 4));
         }
     }
     $tpl->put('FORM', $this->form->display());
     return new AdminCustomizationDisplayResponse($tpl, $this->lang['customization.interface']);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:31,代码来源:AdminCustomizeInterfaceController.class.php

示例6: execute

 function execute(HTTPRequestCustom $request)
 {
     // Define template
     $this->views = new FileTemplate('wpimport/import.tpl');
     // Load lang
     $this->lang = LangLoader::get('common', 'wpimport');
     // Add lang
     $this->views->add_lang($this->lang);
     // Build Form
     $this->build_form();
     // Add Form to template
     $this->views->put('FORM', $this->form->display());
     // Check max_execution_time
     $maxExecutionTime = ini_get('max_execution_time');
     $this->views->put('CAN_SET_EXECUTION_TIME', false);
     $this->views->put('MAX_EXECUTION_TIME', $maxExecutionTime);
     @ini_set('max_execution_time', 0);
     if (ini_get('max_execution_time') == 0) {
         $this->views->put('CAN_SET_EXECUTION_TIME', true);
     }
     if ($this->submit_button->has_been_submited() && $this->form->validate()) {
         $importer = array();
         $listImporter = self::listImporters();
         foreach ($listImporter as $i) {
             if ($this->form->get_field_by_id('importer_' . $i['name'])->get_value()) {
                 $importer[] = $i['name'];
             }
         }
         session_start();
         $_SESSION['wpimport'] = array('phpboostpath' => $this->form->get_field_by_id('phpboostpath')->get_value(), 'wppath' => $this->form->get_field_by_id('wppath')->get_value(), 'default_author' => $this->form->get_field_by_id('default_author')->get_value(), 'default_cat_image' => $this->form->get_field_by_id('default_cat_image')->get_value(), 'import_location' => $this->form->get_field_by_id('import_location')->get_value(), 'importer' => implode(',', $importer));
         AppContext::get_response()->redirect(DispatchManager::get_url('../wpimport', '/admin/import/start'));
     }
     return $this->build_response();
 }
开发者ID:ppelisset,项目名称:WPImport,代码行数:34,代码来源:WPImportController.class.php

示例7: create_response

 /**
  * @param Template $view
  * @return InstallDisplayResponse
  */
 private function create_response()
 {
     $view = new FileTemplate('install/license.tpl');
     $view->put('LICENSE_FORM', $this->form->display());
     $step_title = $this->lang['step.license.title'];
     $response = new InstallDisplayResponse(1, $step_title, $view);
     return $response;
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:12,代码来源:InstallLicenseController.class.php

示例8: execute

 public function execute(HTTPRequestCustom $request)
 {
     $this->get_right_controller_regarding_authorizations();
     $this->init();
     $this->build_form();
     if ($this->submit_button->has_been_submited() && $this->form->validate()) {
         $this->save();
     }
     $this->tpl->put('FORM', $this->form->display());
     return $this->build_response($this->tpl);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:11,代码来源:UserRegistrationController.class.php

示例9: execute

 public function execute(HTTPRequestCustom $request)
 {
     $this->init();
     $this->build_form();
     if ($this->submit_button->has_been_submited() && $this->form->validate()) {
         $result = $this->send_mail();
         $this->view->put_all(array('C_MAIL_SENT' => true, 'C_SUCCESS' => empty($result), 'ERROR' => $result));
     }
     $this->view->put('SMTP_FORM', $this->form->display());
     return $this->generate_response();
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:11,代码来源:SandboxMailController.class.php

示例10: execute

 public function execute(HTTPRequestCustom $request)
 {
     $this->init();
     $this->check_authorizations();
     $this->build_form($request);
     if ($this->submit_button->has_been_submited() && $this->form->validate()) {
         $id = $this->save();
         AppContext::get_response()->redirect(GuestbookUrlBuilder::home($this->is_new_message ? 1 : $this->form->get_value('page'), $id));
     }
     $this->view->put('FORM', $this->form->display());
     return $this->generate_response($this->view);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:12,代码来源:GuestbookFormController.class.php

示例11: execute

 public function execute(HTTPRequestCustom $request)
 {
     $this->init();
     $this->check_authorizations();
     $this->build_form($request);
     if ($this->submit_button->has_been_submited() && $this->form->validate()) {
         $this->save();
         $this->redirect();
     }
     $this->tpl->put_all(array('FORM' => $this->form->display(), 'C_TINYMCE_EDITOR' => AppContext::get_current_user()->get_editor() == 'TinyMCE'));
     return $this->build_response($this->tpl);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:12,代码来源:ArticlesFormController.class.php

示例12: execute

 public function execute(HTTPRequestCustom $request)
 {
     $this->init();
     $this->check_authorizations();
     $this->build_form($request);
     $tpl = new StringTemplate('# INCLUDE FORM #');
     $tpl->add_lang($this->lang);
     if ($this->submit_button->has_been_submited() && $this->form->validate()) {
         $this->save();
     }
     $tpl->put('FORM', $this->form->display());
     return $this->generate_response($tpl);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:13,代码来源:BugtrackerFormController.class.php

示例13: execute

 public function execute(HTTPRequestCustom $request)
 {
     $this->init();
     $this->build_form();
     if ($this->submit_button->has_been_submited() && $this->form->validate()) {
         $this->save();
         $this->form->get_field_by_id('other_start_page')->set_hidden($this->general_config->get_module_home_page() != 'other');
         $this->clear_cache();
         $this->tpl->put('MSG', MessageHelper::display(LangLoader::get_message('message.success.config', 'status-messages-common'), MessageHelper::SUCCESS, 5));
     }
     $this->tpl->put('FORM', $this->form->display());
     return new AdminConfigDisplayResponse($this->tpl, $this->lang['general-config']);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:13,代码来源:AdminGeneralConfigController.class.php

示例14: execute

 public function execute(HTTPRequestCustom $request)
 {
     AppContext::get_session()->csrf_get_protect();
     $this->init($request);
     $this->check_authorizations();
     $this->build_form($request);
     if ($this->submit_button->has_been_submited() && $this->form->validate()) {
         $this->save();
         AppContext::get_response()->redirect($this->form->get_value('referrer') ? $this->form->get_value('referrer') : BugtrackerUrlBuilder::unsolved(), StringVars::replace_vars(LangLoader::get_message('success.delete', 'common', 'bugtracker'), array('id' => $this->bug->get_id())));
     }
     $this->view->put('FORM', $this->form->display());
     return $this->build_response($this->view);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:13,代码来源:BugtrackerDeleteBugController.class.php

示例15: execute

 public function execute(HTTPRequestCustom $request)
 {
     $this->init();
     $this->build_form($request);
     $tpl = new StringTemplate('# INCLUDE MSG # # INCLUDE FORM #');
     $tpl->add_lang($this->lang);
     if ($this->submit_button->has_been_submited() && $this->form->validate()) {
         $display_name = $this->save();
         AppContext::get_response()->redirect($this->form->get_value('referrer') ? $this->form->get_value('referrer') : AdminMembersUrlBuilder::management(), StringVars::replace_vars($this->lang['user.message.success.add'], array('name' => $display_name)));
     }
     $tpl->put('FORM', $this->form->display());
     return new AdminMembersDisplayResponse($tpl, LangLoader::get_message('members.add-member', 'admin-user-common'));
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:13,代码来源:AdminMemberAddController.class.php


注:本文中的HTMLForm::display方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。