private function build_form()
    {
        $form = new HTMLForm(__CLASS__);
        $fieldset = new FormFieldsetHTML('config', $this->admin_common_lang['configuration']);
        $form->add_fieldset($fieldset);
        $fieldset->add_field(new FormFieldNumberEditor('number_news_per_page', $this->admin_common_lang['config.items_number_per_page'], $this->config->get_number_news_per_page(), array('min' => 1, 'max' => 50, 'required' => true), array(new FormFieldConstraintIntegerRange(1, 50))));
        $fieldset->add_field(new FormFieldNumberEditor('number_columns_display_news', $this->lang['admin.config.number_columns_display_news'], $this->config->get_number_columns_display_news(), array('min' => 1, 'max' => 4, 'required' => true), array(new FormFieldConstraintIntegerRange(1, 4))));
        $fieldset->add_field(new FormFieldCheckbox('display_condensed', $this->lang['admin.config.display_condensed'], $this->config->get_display_condensed_enabled(), array('events' => array('click' => '
			if (HTMLForms.getField("display_condensed").getValue()) {
				HTMLForms.getField("display_descriptions_to_guests").enable();
				HTMLForms.getField("number_character_to_cut").enable();
			} else {
				HTMLForms.getField("display_descriptions_to_guests").disable();
				HTMLForms.getField("number_character_to_cut").disable();
			}'))));
        $fieldset->add_field(new FormFieldCheckbox('display_descriptions_to_guests', $this->lang['admin.config.display_descriptions_to_guests'], $this->config->are_descriptions_displayed_to_guests(), array('hidden' => !$this->config->get_display_condensed_enabled())));
        $fieldset->add_field(new FormFieldNumberEditor('number_character_to_cut', $this->lang['admin.config.number_character_to_cut'], $this->config->get_number_character_to_cut(), array('min' => 20, 'max' => 1000, 'required' => true, 'hidden' => !$this->config->get_display_condensed_enabled()), array(new FormFieldConstraintIntegerRange(20, 1000))));
        $fieldset->add_field(new FormFieldCheckbox('comments_enabled', $this->admin_common_lang['config.comments_enabled'], $this->config->get_comments_enabled()));
        $fieldset->add_field(new FormFieldCheckbox('news_suggestions_enabled', $this->lang['admin.config.news_suggestions_enabled'], $this->config->get_news_suggestions_enabled()));
        $fieldset->add_field(new FormFieldCheckbox('author_displayed', $this->admin_common_lang['config.author_displayed'], $this->config->get_author_displayed()));
        $fieldset->add_field(new FormFieldSimpleSelectChoice('display_type', $this->admin_common_lang['config.display_type'], $this->config->get_display_type(), array(new FormFieldSelectChoiceOption($this->admin_common_lang['config.display_type.block'], NewsConfig::DISPLAY_BLOCK), new FormFieldSelectChoiceOption($this->admin_common_lang['config.display_type.list'], NewsConfig::DISPLAY_LIST))));
        $common_lang = LangLoader::get('common');
        $fieldset_authorizations = new FormFieldsetHTML('authorizations_fieldset', $common_lang['authorizations'], array('description' => $this->admin_common_lang['config.authorizations.explain']));
        $form->add_fieldset($fieldset_authorizations);
        $auth_settings = new AuthorizationsSettings(array(new ActionAuthorization($common_lang['authorizations.read'], Category::READ_AUTHORIZATIONS), new ActionAuthorization($common_lang['authorizations.write'], Category::WRITE_AUTHORIZATIONS), new ActionAuthorization($common_lang['authorizations.contribution'], Category::CONTRIBUTION_AUTHORIZATIONS), new ActionAuthorization($common_lang['authorizations.moderation'], Category::MODERATION_AUTHORIZATIONS)));
        $auth_setter = new FormFieldAuthorizationsSetter('authorizations', $auth_settings);
        $auth_settings->build_from_auth_array($this->config->get_authorizations());
        $fieldset_authorizations->add_field($auth_setter);
        $this->submit_button = new FormButtonDefaultSubmit();
        $form->add_button($this->submit_button);
        $form->add_button(new FormButtonReset());
        $this->form = $form;
    }