當前位置: 首頁>>代碼示例>>PHP>>正文


PHP HTMLForm::set_css_class方法代碼示例

本文整理匯總了PHP中HTMLForm::set_css_class方法的典型用法代碼示例。如果您正苦於以下問題:PHP HTMLForm::set_css_class方法的具體用法?PHP HTMLForm::set_css_class怎麽用?PHP HTMLForm::set_css_class使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在HTMLForm的用法示例。


在下文中一共展示了HTMLForm::set_css_class方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: build_form

 private function build_form($field, $mode)
 {
     $common_lang = LangLoader::get('common');
     $form = new HTMLForm(__CLASS__, '', false);
     $form->set_css_class('options');
     $fieldset = new FormFieldsetHorizontal('filters', array('description' => $common_lang['sort_by']));
     $form->add_fieldset($fieldset);
     $fieldset->add_field(new FormFieldSimpleSelectChoice('sort_fields', '', $field, array(new FormFieldSelectChoiceOption($common_lang['form.date.creation'], 'date'), new FormFieldSelectChoiceOption($common_lang['form.title'], 'title'), new FormFieldSelectChoiceOption($common_lang['sort_by.number_views'], 'view'), new FormFieldSelectChoiceOption($common_lang['sort_by.number_comments'], 'com'), new FormFieldSelectChoiceOption($common_lang['sort_by.best_note'], 'note'), new FormFieldSelectChoiceOption($common_lang['author'], 'author')), array('events' => array('change' => 'document.location = "' . ArticlesUrlBuilder::display_pending_articles()->rel() . '" + HTMLForms.getField("sort_fields").getValue() + "/" + HTMLForms.getField("sort_mode").getValue();'))));
     $fieldset->add_field(new FormFieldSimpleSelectChoice('sort_mode', '', $mode, array(new FormFieldSelectChoiceOption($common_lang['sort.asc'], 'asc'), new FormFieldSelectChoiceOption($common_lang['sort.desc'], 'desc')), array('events' => array('change' => 'document.location = "' . ArticlesUrlBuilder::display_pending_articles()->rel() . '" + HTMLForms.getField("sort_fields").getValue() + "/" + HTMLForms.getField("sort_mode").getValue();'))));
     $this->form = $form;
 }
開發者ID:AroundPBT,項目名稱:PHPBoost,代碼行數:11,代碼來源:ArticlesDisplayPendingArticlesController.class.php

示例2: build_sorting_form

 private function build_sorting_form($field, $mode)
 {
     $common_lang = LangLoader::get('common');
     $form = new HTMLForm(__CLASS__, '', false);
     $form->set_css_class('options');
     $fieldset = new FormFieldsetHorizontal('filters', array('description' => $common_lang['sort_by']));
     $form->add_fieldset($fieldset);
     $fieldset->add_field(new FormFieldSimpleSelectChoice('sort_fields', '', $field, array(new FormFieldSelectChoiceOption($common_lang['form.date.creation'], 'date'), new FormFieldSelectChoiceOption($this->lang['faq.form.question'], 'question')), array('events' => array('change' => 'document.location = "' . FaqUrlBuilder::display_pending()->rel() . '" + HTMLForms.getField("sort_fields").getValue() + "/" + HTMLForms.getField("sort_mode").getValue();'))));
     $fieldset->add_field(new FormFieldSimpleSelectChoice('sort_mode', '', $mode, array(new FormFieldSelectChoiceOption($common_lang['sort.asc'], 'asc'), new FormFieldSelectChoiceOption($common_lang['sort.desc'], 'desc')), array('events' => array('change' => 'document.location = "' . FaqUrlBuilder::display_pending()->rel() . '" + HTMLForms.getField("sort_fields").getValue() + "/" + HTMLForms.getField("sort_mode").getValue();'))));
     $this->tpl->put('SORT_FORM', $form->display());
 }
開發者ID:AroundPBT,項目名稱:PHPBoost,代碼行數:11,代碼來源:FaqDisplayPendingFaqQuestionsController.class.php

示例3: build_sorting_form

 private function build_sorting_form($field, $mode)
 {
     $common_lang = LangLoader::get('common');
     $form = new HTMLForm(__CLASS__, '', false);
     $form->set_css_class('options');
     $fieldset = new FormFieldsetHorizontal('filters', array('description' => $common_lang['sort_by']));
     $form->add_fieldset($fieldset);
     $fieldset->add_field(new FormFieldSimpleSelectChoice('sort_fields', '', $field, array(new FormFieldSelectChoiceOption($common_lang['form.date.update'], 'updated_date'), new FormFieldSelectChoiceOption($common_lang['form.date.creation'], 'date'), new FormFieldSelectChoiceOption($common_lang['form.name'], 'name'), new FormFieldSelectChoiceOption($this->lang['downloads_number'], 'download'), new FormFieldSelectChoiceOption($common_lang['sort_by.number_comments'], 'com'), new FormFieldSelectChoiceOption($common_lang['sort_by.best_note'], 'note'), new FormFieldSelectChoiceOption($common_lang['author'], 'author')), array('events' => array('change' => 'document.location = "' . DownloadUrlBuilder::display_category($this->category->get_id(), $this->category->get_rewrited_name())->rel() . '" + HTMLForms.getField("sort_fields").getValue() + "/" + HTMLForms.getField("sort_mode").getValue();'))));
     $fieldset->add_field(new FormFieldSimpleSelectChoice('sort_mode', '', $mode, array(new FormFieldSelectChoiceOption($common_lang['sort.asc'], 'asc'), new FormFieldSelectChoiceOption($common_lang['sort.desc'], 'desc')), array('events' => array('change' => 'document.location = "' . DownloadUrlBuilder::display_category($this->category->get_id(), $this->category->get_rewrited_name())->rel() . '" + HTMLForms.getField("sort_fields").getValue() + "/" + HTMLForms.getField("sort_mode").getValue();'))));
     $this->tpl->put('SORT_FORM', $form->display());
 }
開發者ID:AroundPBT,項目名稱:PHPBoost,代碼行數:11,代碼來源:DownloadDisplayCategoryController.class.php

示例4: build_form

 private function build_form($array_page, $current_page)
 {
     $form = new HTMLForm(__CLASS__, '', false);
     $form->set_css_class('options');
     $fieldset = new FormFieldsetHorizontal('pages', array('description' => $this->lang['articles.summary']));
     $form->add_fieldset($fieldset);
     $article_pages = $this->list_article_pages($array_page);
     $fieldset->add_field(new FormFieldSimpleSelectChoice('article_pages', '', $current_page, $article_pages, array('class' => 'summary', 'events' => array('change' => 'document.location = "' . ArticlesUrlBuilder::display_article($this->category->get_id(), $this->category->get_rewrited_name(), $this->article->get_id(), $this->article->get_rewrited_title())->rel() . '" + HTMLForms.getField("article_pages").getValue();'))));
     $this->tpl->put('FORM', $form->display());
 }
開發者ID:AroundPBT,項目名稱:PHPBoost,代碼行數:10,代碼來源:ArticlesDisplayArticlesController.class.php


注:本文中的HTMLForm::set_css_class方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。