本文整理汇总了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;
}
示例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());
}
示例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());
}
示例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());
}