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 FormFieldCheckbox('database_tables_optimization_enabled', $this->lang['config.database-tables-optimization-enabled'], $this->config->is_database_tables_optimization_enabled(), array('events' => array('change' => '
				if (HTMLForms.getField("database_tables_optimization_enabled").getValue()) { 
					HTMLForms.getField("database_tables_optimization_day").enable();
				} else { 
					HTMLForms.getField("database_tables_optimization_day").disable();
				}'))));
        $date_lang = LangLoader::get('date-common');
        $fieldset->add_field(new FormFieldSimpleSelectChoice('database_tables_optimization_day', $this->lang['config.database-tables-optimization-day'], $this->config->get_database_tables_optimization_day(), array(new FormFieldSelectChoiceOption($date_lang['sunday'], 0), new FormFieldSelectChoiceOption($date_lang['monday'], 1), new FormFieldSelectChoiceOption($date_lang['tuesday'], 2), new FormFieldSelectChoiceOption($date_lang['wednesday'], 3), new FormFieldSelectChoiceOption($date_lang['thursday'], 4), new FormFieldSelectChoiceOption($date_lang['friday'], 5), new FormFieldSelectChoiceOption($date_lang['saturday'], 6), new FormFieldSelectChoiceOption($date_lang['every_month'], 7)), array('description' => $this->lang['config.database-tables-optimization-day.explain'], 'hidden' => !$this->config->is_database_tables_optimization_enabled())));
        $this->submit_button = new FormButtonDefaultSubmit();
        $form->add_button($this->submit_button);
        $form->add_button(new FormButtonReset());
        $this->form = $form;
    }