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;
 }
 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());
 }
 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());
 }
 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());
 }