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


PHP HTMLForm::get_field_by_id方法代码示例

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


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

示例1: execute

 public function execute(HTTPRequestCustom $request)
 {
     $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->handle_form();
         $this->form->get_field_by_id('file_life_time')->set_hidden(!SitemapXMLFileService::is_xml_file_generation_enabled());
         $tpl->put('MSG', MessageHelper::display(LangLoader::get_message('message.success.config', 'status-messages-common'), MessageHelper::SUCCESS, 5));
     }
     $tpl->put('FORM', $this->form->display());
     return $this->build_response($tpl);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:13,代码来源:AdminSitemapController.class.php

示例2: 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

示例3: 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('maintain_during')->set_hidden($this->get_maintain_type() != 'during');
         $this->form->get_field_by_id('maintain_until')->set_hidden($this->get_maintain_type() != 'until');
         $this->form->get_field_by_id('display_duration_for_admin')->set_hidden(!$this->maintenance_config->get_display_duration());
         $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 AdminMaintainDisplayResponse($this->tpl, LangLoader::get_message('maintain', 'user-common'));
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:14,代码来源:AdminMaintainController.class.php

示例4: 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('forbidden_tags')->set_selected_options($this->content_formatting_config->get_forbidden_tags());
         $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 AdminContentDisplayResponse($tpl, $this->lang['content.config']);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:14,代码来源:AdminContentConfigController.class.php

示例5: 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('database_tables_optimization_day')->set_hidden(!$this->config->is_database_tables_optimization_enabled());
         $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 AdminDatabaseDisplayResponse($tpl, $this->lang['module_config_title']);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:14,代码来源:AdminDatabaseConfigController.class.php

示例6: 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('display_descriptions_to_guests')->set_hidden($this->config->get_category_display_type() == DownloadConfig::DISPLAY_ALL_CONTENT);
         $this->form->get_field_by_id('notation_scale')->set_hidden(!$this->config->is_notation_enabled());
         $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 AdminDownloadDisplayResponse($tpl, $this->lang['module_config_title']);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:15,代码来源:AdminDownloadConfigController.class.php

示例7: 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('birthday_color')->set_hidden(!$this->config->is_members_birthday_enabled());
         $tpl->put('MSG', MessageHelper::display(LangLoader::get_message('message.success.config', 'status-messages-common'), MessageHelper::SUCCESS, 5));
     }
     //Display the form on the template
     $tpl->put('FORM', $this->form->display());
     //Display the generated page
     return new AdminCalendarDisplayResponse($tpl, $this->lang['module_config_title']);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:16,代码来源:AdminCalendarConfigController.class.php

示例8: execute

 public function execute(HTTPRequestCustom $request)
 {
     $this->init($request);
     $this->check_authorizations();
     $this->build_form();
     if ($this->submit_button->has_been_submited() && $this->form->validate()) {
         $this->save();
         $this->form->get_field_by_id('assigned_to')->set_hidden(!$this->bug->is_assigned());
         if ($this->config->get_versions_fix()) {
             $this->form->get_field_by_id('fixed_in')->set_hidden(!$this->bug->is_fixed() && !$this->bug->is_in_progress());
         }
         $this->form->get_field_by_id('comments_message')->set_value('');
         $this->view->put('MSG', MessageHelper::display($this->lang['success.' . $this->bug->get_status()], MessageHelper::SUCCESS, 5));
     }
     $this->view->put('FORM', $this->form->display());
     return $this->build_response($this->view);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:17,代码来源:BugtrackerChangeBugStatusController.class.php

示例9: 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

示例10: 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('type_activation_members')->set_hidden(!$this->user_account_config->is_registration_enabled());
         $this->form->get_field_by_id('unactivated_accounts_timeout')->set_hidden(!$this->user_account_config->is_registration_enabled() || $this->user_account_config->get_member_accounts_validation_method() == UserAccountsConfig::ADMINISTRATOR_USER_ACCOUNTS_VALIDATION);
         $this->form->get_field_by_id('fb_app_id')->set_hidden(!$this->authentication_config->is_fb_auth_enabled());
         $this->form->get_field_by_id('fb_app_key')->set_hidden(!$this->authentication_config->is_fb_auth_enabled());
         $this->form->get_field_by_id('google_client_id')->set_hidden(!$this->authentication_config->is_google_auth_enabled());
         $this->form->get_field_by_id('google_client_secret')->set_hidden(!$this->authentication_config->is_google_auth_enabled());
         $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 AdminMembersDisplayResponse($tpl, $this->lang['members.members-management']);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:19,代码来源:AdminMemberConfigController.class.php

示例11: 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('max_messages_number')->set_hidden(!$this->config->is_max_messages_number_enabled());
         $this->form->get_field_by_id('max_links_number_per_message')->set_hidden(!$this->config->is_max_links_number_per_message_enabled());
         $this->form->get_field_by_id('forbidden_formatting_tags')->set_selected_options($this->config->get_forbidden_formatting_tags());
         $this->form->get_field_by_id('refresh_delay')->set_hidden(!$this->config->is_automatic_refresh_enabled());
         $this->form->get_field_by_id('shout_max_messages_number')->set_hidden(!$this->config->is_shout_max_messages_number_enabled());
         $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 AdminShoutboxDisplayResponse($tpl, $this->lang['module_config_title']);
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:18,代码来源:AdminShoutboxConfigController.class.php

示例12: 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


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