protected function create_form()
 {
     $form = new HTMLForm('comments', TextHelper::htmlentities($this->comments_topic->get_url()) . '#comments-list');
     $fieldset = new FormFieldsetHTML('add_comment', $this->comments_lang['comment.add']);
     $form->add_fieldset($fieldset);
     if (!$this->user->check_level(User::MEMBER_LEVEL)) {
         $fieldset->add_field(new FormFieldTextEditor('name', $this->common_lang['form.name'], LangLoader::get_message('visitor', 'user-common'), array('maxlength' => 25)));
     }
     $fieldset->add_field(new FormFieldRichTextEditor('message', $this->lang['message'], '', array('formatter' => $this->get_formatter(), 'rows' => 10, 'cols' => 47, 'required' => $this->lang['require_text']), array(new FormFieldConstraintMaxLinks($this->comments_configuration->get_max_links_comment(), true), new FormFieldConstraintAntiFlood(CommentsManager::get_last_comment_added($this->user->get_id())))));
     $form->add_button($submit_button = new FormButtonDefaultSubmit());
     $form->add_button(new FormButtonReset());
     $this->set_form($form);
     $this->set_submit_button($submit_button);
     return $form;
 }