本文整理汇总了PHP中HTMLForm::add_fieldset方法的典型用法代码示例。如果您正苦于以下问题:PHP HTMLForm::add_fieldset方法的具体用法?PHP HTMLForm::add_fieldset怎么用?PHP HTMLForm::add_fieldset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLForm
的用法示例。
在下文中一共展示了HTMLForm::add_fieldset方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build_form
private function build_form($theme_selected)
{
$form = new HTMLForm(__CLASS__);
$theme_choise_fieldset = new FormFieldsetHTML('theme-choice', $this->lang['customization.interface.theme-choice']);
$form->add_fieldset($theme_choise_fieldset);
$theme_choise_fieldset->add_field(new FormFieldSimpleSelectChoice('select_theme', $this->lang['customization.interface.select-theme'], $theme_selected, $this->list_themes(), array('events' => array('change' => 'document.location.href = "' . AdminCustomizeUrlBuilder::customize_interface()->rel() . '" + HTMLForms.getField(\'select_theme\').getValue()'))));
$customize_interface_fieldset = new FormFieldsetHTML('customize_interface', $this->lang['customization.interface']);
$form->add_fieldset($customize_interface_fieldset);
$header_logo_path = $this->get_header_logo_path($theme_selected);
if (!empty($header_logo_path)) {
$header_logo_file = new File(PATH_TO_ROOT . $header_logo_path);
if ($header_logo_file->exists()) {
$picture = '<img src="' . Url::to_rel($header_logo_file->get_path()) . '" alt="' . $this->lang['customization.interface.logo.current'] . '" title="' . $this->lang['customization.interface.logo.current'] . '"/>';
$customize_interface_fieldset->add_field(new FormFieldFree('current_logo', $this->lang['customization.interface.logo.current'], $picture));
} else {
$customize_interface_fieldset->add_field(new FormFieldFree('current_logo', $this->lang['customization.interface.logo.current'], '<span class="text-strong color-alert">' . $this->lang['customization.interface.logo.current.erased'] . '</span>'));
}
} else {
$customize_interface_fieldset->add_field(new FormFieldFree('current_logo', $this->lang['customization.interface.logo.current'], $this->lang['customization.interface.logo.current.null']));
}
$customize_interface_fieldset->add_field(new FormFieldFilePicker('header_logo', $this->lang['customization.interface.logo.current.change'], array('description' => $this->lang['customization.interface.logo.current.change-explain'])));
$customize_interface_fieldset->add_field(new FormFieldCheckbox('use_default_logo', $this->lang['customization.interface.logo.use-default'], FormFieldCheckbox::UNCHECKED));
$this->submit_button = new FormButtonDefaultSubmit();
$form->add_button($this->submit_button);
$form->add_button(new FormButtonReset());
$this->form = $form;
}
示例2: build_form
private function build_form()
{
$security_config = SecurityConfig::load();
$this->form = new HTMLForm('adminForm', '', false);
$fieldset = new FormFieldsetHTML('adminAccount', $this->lang['admin.account']);
$this->form->add_fieldset($fieldset);
$fieldset->add_field(new FormFieldTextEditor('display_name', LangLoader::get_message('display_name', 'user-common'), '', array('maxlength' => 100, 'required' => true, 'events' => array('blur' => '
if (!HTMLForms.getField("login").getValue() && HTMLForms.getField("display_name").validate() == "") {
HTMLForms.getField("login").setValue(HTMLForms.getField("display_name").getValue().replace(/\\s/g, \'\'));
HTMLForms.getField("login").enableValidationMessage();
HTMLForms.getField("login").liveValidate();
}')), array(new FormFieldConstraintLengthRange(3, 100, $this->lang['admin.login.length']))));
$fieldset->add_field(new FormFieldMailEditor('email', $this->lang['admin.email'], '', array('required' => true)));
$fieldset->add_field(new FormFieldCheckbox('custom_login', LangLoader::get_message('login.custom', 'user-common'), false, array('description' => LangLoader::get_message('login.custom.explain', 'user-common'), 'events' => array('click' => '
if (HTMLForms.getField("custom_login").getValue()) {
HTMLForms.getField("login").enable();
} else {
HTMLForms.getField("login").disable();
}'))));
$fieldset->add_field(new FormFieldTextEditor('login', LangLoader::get_message('login', 'user-common'), '', array('required' => true, 'hidden' => true, 'maxlength' => 25), array(new FormFieldConstraintLengthRange(3, 25), new FormFieldConstraintPHPBoostAuthLoginExists())));
$fieldset->add_field($password = new FormFieldPasswordEditor('password', $this->lang['admin.password'], '', array('description' => StringVars::replace_vars($this->lang['admin.password.explanation'], array('number' => $security_config->get_internal_password_min_length())), 'required' => true), array(new FormFieldConstraintLengthMin($security_config->get_internal_password_min_length(), StringVars::replace_vars($this->lang['admin.password.length'], array('number' => $security_config->get_internal_password_min_length()))), new FormFieldConstraintPasswordStrength())));
$fieldset->add_field($repeatPassword = new FormFieldPasswordEditor('repeatPassword', $this->lang['admin.password.repeat'], '', array('required' => true), array(new FormFieldConstraintLengthMin($security_config->get_internal_password_min_length()), new FormFieldConstraintPasswordStrength())));
$this->form->add_constraint(new FormConstraintFieldsEquality($password, $repeatPassword));
$fieldset->add_field(new FormFieldCheckbox('createSession', $this->lang['admin.connectAfterInstall'], true));
$fieldset->add_field(new FormFieldCheckbox('autoconnect', $this->lang['admin.autoconnect'], true));
$action_fieldset = new FormFieldsetSubmit('actions');
$back = new FormButtonLinkCssImg($this->lang['step.previous'], InstallUrlBuilder::website(), 'fa fa-arrow-left');
$action_fieldset->add_element($back);
$this->submit_button = new FormButtonSubmitCssImg($this->lang['step.next'], 'fa fa-arrow-right', 'admin');
$action_fieldset->add_element($this->submit_button);
$this->form->add_fieldset($action_fieldset);
}
示例3: build_form
private function build_form()
{
$form = new HTMLForm(__CLASS__);
//Configuration
$fieldset = new FormFieldsetHTML('configuration_fieldset', LangLoader::get_message('configuration', 'admin-common'));
$form->add_fieldset($fieldset);
$fieldset->add_field(new FormFieldNumberEditor('items_number_per_page', $this->lang['calendar.config.items_number_per_page'], $this->config->get_items_number_per_page(), array('min' => 1, 'max' => 50, 'required' => true), array(new FormFieldConstraintIntegerRange(1, 50))));
$fieldset->add_field(new FormFieldCheckbox('comments_enabled', LangLoader::get_message('config.comments_enabled', 'admin-common'), $this->config->are_comments_enabled()));
$fieldset->add_field(new FormFieldColorPicker('event_color', $this->lang['calendar.config.event_color'], $this->config->get_event_color(), array(), array(new FormFieldConstraintRegex('`^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$`i'))));
$fieldset->add_field(new FormFieldCheckbox('members_birthday_enabled', $this->lang['calendar.config.members_birthday_enabled'], $this->config->is_members_birthday_enabled(), array('events' => array('click' => '
if (HTMLForms.getField("members_birthday_enabled").getValue()) {
HTMLForms.getField("birthday_color").enable();
} else {
HTMLForms.getField("birthday_color").disable();
}'))));
$user_born_field = ExtendedFieldsCache::load()->get_extended_field_by_field_name('user_born');
if (!empty($user_born_field) && !$user_born_field['display']) {
$fieldset->add_field(new FormFieldHTML('user_born_disabled_msg', MessageHelper::display($this->lang['calendar.error.e_user_born_field_disabled'], MessageHelper::WARNING)->render()));
}
$fieldset->add_field(new FormFieldColorPicker('birthday_color', $this->lang['calendar.config.birthday_color'], $this->config->get_birthday_color(), array('hidden' => !$this->config->is_members_birthday_enabled()), array(new FormFieldConstraintRegex('`^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$`i'))));
$common_lang = LangLoader::get('common');
$fieldset = new FormFieldsetHTML('authorizations_fieldset', $common_lang['authorizations'], array('description' => LangLoader::get_message('config.authorizations.explain', 'admin-common')));
$form->add_fieldset($fieldset);
$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->add_field($auth_setter);
//Submit and reset buttons
$this->submit_button = new FormButtonDefaultSubmit();
$form->add_button($this->submit_button);
$form->add_button(new FormButtonReset());
$this->form = $form;
}
示例4: build_form
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('items_per_page', $this->admin_common_lang['config.items_number_per_page'], $this->config->get_items_per_page(), array('min' => 1, 'max' => 50, 'required' => true), array(new FormFieldConstraintIntegerRange(1, 50))));
$fieldset->add_field(new FormFieldMultipleSelectChoice('forbidden_tags', $this->admin_common_lang['config.forbidden-tags'], $this->config->get_forbidden_tags(), $this->generate_forbidden_tags_option(), array('size' => 10)));
$fieldset->add_field(new FormFieldCheckbox('max_links_number_per_message_enabled', $this->lang['admin.config.max_links_number_per_message_enabled'], $this->config->is_max_links_number_per_message_enabled(), array('events' => array('click' => '
if (HTMLForms.getField("max_links_number_per_message_enabled").getValue()) {
HTMLForms.getField("max_links_number_per_message").enable();
} else {
HTMLForms.getField("max_links_number_per_message").disable();
}'))));
$fieldset->add_field(new FormFieldNumberEditor('max_links_number_per_message', $this->lang['admin.config.max_links'], $this->config->get_maximum_links_message(), array('min' => 1, 'max' => 20, 'required' => true, 'hidden' => !$this->config->is_max_links_number_per_message_enabled()), array(new FormFieldConstraintIntegerRange(1, 20))));
$common_lang = LangLoader::get('common');
$fieldset_authorizations = new FormFieldsetHTML('authorizations', $common_lang['authorizations']);
$form->add_fieldset($fieldset_authorizations);
$auth_settings = new AuthorizationsSettings(array(new ActionAuthorization($this->lang['admin.authorizations.read'], GuestbookAuthorizationsService::READ_AUTHORIZATIONS), new ActionAuthorization($common_lang['authorizations.write'], GuestbookAuthorizationsService::WRITE_AUTHORIZATIONS), new ActionAuthorization($common_lang['authorizations.moderation'], GuestbookAuthorizationsService::MODERATION_AUTHORIZATIONS)));
$auth_settings->build_from_auth_array($this->config->get_authorizations());
$fieldset_authorizations->add_field(new FormFieldAuthorizationsSetter('authorizations', $auth_settings));
$this->submit_button = new FormButtonDefaultSubmit();
$form->add_button($this->submit_button);
$form->add_button(new FormButtonReset());
$this->form = $form;
}
示例5: build_form
public function build_form()
{
$form = new HTMLForm(__CLASS__);
// Fieldset to configure path
$fieldsetPath = new FormFieldsetHTML('wpimport-path', $this->lang['wpimport.fieldset-path']);
$form->add_fieldset($fieldsetPath);
$fieldsetPath->add_field(new FormFieldTextEditor('phpboostpath', $this->lang['wpimport.phpboostpath'], realpath(__DIR__ . '/../../')));
$fieldsetPath->add_field(new FormFieldTextEditor('wppath', $this->lang['wpimport.wppath'], realpath(__DIR__ . '/../../../'), array(), array(new FormFieldConstraintWordPressPath($this->lang['constraint.wp-path']))));
// Fieldset to configure which data are import
$fieldsetImporter = new FormFieldsetHTML('wpimport-importer', $this->lang['wpimport.fieldset-importer']);
$form->add_fieldset($fieldsetImporter);
$importers = $this->listImporters();
foreach ($importers as $importer) {
$fieldsetImporter->add_field(new FormFieldCheckbox('importer_' . $importer['name'], $importer['name'], FormFieldCheckbox::UNCHECKED, array('description' => $this->lang['wpimport.description'] . ': ' . utf8_decode($importer['description']) . '<br />' . $this->lang['wpimport.version'] . ': ' . $importer['version'])));
}
// Fieldset to confgure options
$fieldsetOptions = new FormFieldsetHTML('wpimport-options', $this->lang['wpimport.fieldset-options']);
$form->add_fieldset($fieldsetOptions);
// Default Author
$fieldsetOptions->add_field(new FormFieldAjaxUserAutoComplete('default_author', $this->lang['wpimport.default_author'], AppContext::get_current_user()->get_login(), array('description' => $this->lang['wpimport.default_author.decription']), array(new FormFieldConstraintUserExist($this->lang['wpimport.default_author.error_user_exist']))));
// Default Image
$fieldsetOptions->add_field(new FormFieldUploadFile('default_cat_image', $this->lang['wpimport.default_cat_image'], $this->getDefaultConfiguration()['PHPBOOST_CAT_IMAGE'], array('description' => $this->lang['wpimport.default_cat_image.description'])));
$fieldsetOptions->add_field(new FormFieldTextEditor('import_location', $this->lang['wpimport.import_location'], $this->getDefaultConfiguration()['FILESYSTEM_IMPORT_LOCATION'], array('description' => $this->lang['wpimport.import_location.description'])));
$this->submit_button = new FormButtonSubmit($this->lang['wpimport.submit_configuration'], 'submit_configuration');
$form->add_button($this->submit_button);
$form->add_button(new FormButtonReset($this->lang['wpimport.reset']));
$this->form = $form;
}
示例6: build_form
private function build_form()
{
$this->form = new HTMLForm('smtp_config');
$fieldset = new FormFieldsetHTML('mail_properties', $this->lang['mail.title']);
$this->form->add_fieldset($fieldset);
$sender_mail = new FormFieldMailEditor('sender_mail', $this->lang['mail.sender_mail'], '');
$fieldset->add_field($sender_mail);
$fieldset->add_field(new FormFieldTextEditor('sender_name', $this->lang['mail.sender_name'], '', array(), array(new FormFieldConstraintNotEmpty())));
$recipient_mail = new FormFieldMailEditor('recipient_mail', $this->lang['mail.recipient_mail'], '');
$fieldset->add_field($recipient_mail);
$fieldset->add_field(new FormFieldTextEditor('recipient_name', $this->lang['mail.recipient_name'], '', array(), array(new FormFieldConstraintNotEmpty())));
$fieldset->add_field(new FormFieldTextEditor('mail_subject', $this->lang['mail.subject'], '', array(), array(new FormFieldConstraintNotEmpty())));
$fieldset->add_field(new FormFieldMultiLineTextEditor('mail_content', $this->lang['mail.content'], ''));
$fieldset = new FormFieldsetHTML('send_configuration', $this->lang['mail.smtp_config'], array('description' => $this->lang['mail.smtp_config.explain']));
$this->form->add_fieldset($fieldset);
$fieldset->add_field(new FormFieldCheckbox('use_smtp', $this->lang['mail.use_smtp'], false, array('events' => array('click' => 'if ($FF("use_smtp").getValue()) { $FFS("smtp_configuration").enable(); } else { $FFS("smtp_configuration").disable(); }'))));
$fieldset = new FormFieldsetHTML('smtp_configuration', $this->lang['mail.smtp_configuration'], array('disabled' => true));
$this->form->add_fieldset($fieldset);
$fieldset->add_field(new FormFieldTextEditor('smtp_host', $this->lang['mail.smtp.host'], '', array('disabled' => true), array(new FormFieldConstraintRegex('`^[a-z0-9-]+(?:\\.[a-z0-9-]+)*$`i'))));
$fieldset->add_field(new FormFieldTextEditor('smtp_port', $this->lang['mail.smtp.port'], 25, array('disabled' => true), array(new FormFieldConstraintIntegerRange(0, 65535))));
$fieldset->add_field(new FormFieldTextEditor('smtp_login', $this->lang['mail.smtp.login'], '', array('disabled' => true), array(new FormFieldConstraintNotEmpty())));
$fieldset->add_field(new FormFieldPasswordEditor('smtp_password', $this->lang['mail.smtp.password'], '', array('disabled' => true)));
$select_option = new FormFieldSelectChoiceOption($this->lang['mail.smtp.secure_protocol.none'], 'none');
$fieldset->add_field(new FormFieldSimpleSelectChoice('secure_protocol', $this->lang['mail.smtp.secure_protocol'], $select_option, array($select_option, new FormFieldSelectChoiceOption($this->lang['mail.smtp.secure_protocol.tls'], 'tls'), new FormFieldSelectChoiceOption($this->lang['mail.smtp.secure_protocol.ssl'], 'ssl')), array('disabled' => true)));
$this->submit_button = new FormButtonDefaultSubmit();
$this->form->add_button($this->submit_button);
$this->form->add_constraint(new FormConstraintFieldsInequality($recipient_mail, $sender_mail));
}
示例7: build_form
private function build_form(HTTPRequestCustom $request)
{
$form = new HTMLForm(__CLASS__);
$fieldset = new FormFieldsetHTML('web', $this->get_weblink()->get_id() === null ? $this->lang['web.add'] : $this->lang['web.edit']);
$form->add_fieldset($fieldset);
$fieldset->add_field(new FormFieldTextEditor('name', $this->common_lang['form.name'], $this->get_weblink()->get_name(), array('required' => true)));
$search_category_children_options = new SearchCategoryChildrensOptions();
$search_category_children_options->add_authorizations_bits(Category::READ_AUTHORIZATIONS);
$search_category_children_options->add_authorizations_bits(Category::CONTRIBUTION_AUTHORIZATIONS);
$fieldset->add_field(WebService::get_categories_manager()->get_select_categories_form_field('id_category', $this->common_lang['form.category'], $this->get_weblink()->get_id_category(), $search_category_children_options));
$fieldset->add_field(new FormFieldUrlEditor('url', $this->common_lang['form.url'], $this->get_weblink()->get_url()->absolute(), array('required' => true)));
$fieldset->add_field(new FormFieldRichTextEditor('contents', $this->common_lang['form.description'], $this->get_weblink()->get_contents(), array('rows' => 15, 'required' => true)));
$fieldset->add_field(new FormFieldCheckbox('short_contents_enabled', $this->common_lang['form.short_contents.enabled'], $this->get_weblink()->is_short_contents_enabled(), array('description' => StringVars::replace_vars($this->common_lang['form.short_contents.enabled.description'], array('number' => WebConfig::NUMBER_CARACTERS_BEFORE_CUT)), 'events' => array('click' => '
if (HTMLForms.getField("short_contents_enabled").getValue()) {
HTMLForms.getField("short_contents").enable();
} else {
HTMLForms.getField("short_contents").disable();
}'))));
$fieldset->add_field(new FormFieldRichTextEditor('short_contents', $this->common_lang['form.short_contents'], $this->get_weblink()->get_short_contents(), array('hidden' => !$this->get_weblink()->is_short_contents_enabled())));
$other_fieldset = new FormFieldsetHTML('other', $this->common_lang['form.other']);
$form->add_fieldset($other_fieldset);
$other_fieldset->add_field(new FormFieldCheckbox('partner', $this->lang['web.form.partner'], $this->get_weblink()->is_partner(), array('events' => array('click' => '
if (HTMLForms.getField("partner").getValue()) {
HTMLForms.getField("partner_picture").enable();
HTMLForms.getField("privileged_partner").enable();
} else {
HTMLForms.getField("partner_picture").disable();
HTMLForms.getField("privileged_partner").disable();
}'))));
$other_fieldset->add_field(new FormFieldUploadPictureFile('partner_picture', $this->lang['web.form.partner_picture'], $this->get_weblink()->get_partner_picture()->relative(), array('hidden' => !$this->get_weblink()->is_partner())));
$other_fieldset->add_field(new FormFieldCheckbox('privileged_partner', $this->lang['web.form.privileged_partner'], $this->get_weblink()->is_privileged_partner(), array('description' => $this->lang['web.form.privileged_partner.explain'], 'hidden' => !$this->get_weblink()->is_partner())));
$other_fieldset->add_field(WebService::get_keywords_manager()->get_form_field($this->get_weblink()->get_id(), 'keywords', $this->common_lang['form.keywords'], array('description' => $this->common_lang['form.keywords.description'])));
if (!$this->is_contributor_member()) {
$publication_fieldset = new FormFieldsetHTML('publication', $this->common_lang['form.approbation']);
$form->add_fieldset($publication_fieldset);
$publication_fieldset->add_field(new FormFieldDateTime('creation_date', $this->common_lang['form.date.creation'], $this->get_weblink()->get_creation_date(), array('required' => true)));
$publication_fieldset->add_field(new FormFieldSimpleSelectChoice('approbation_type', $this->common_lang['form.approbation'], $this->get_weblink()->get_approbation_type(), array(new FormFieldSelectChoiceOption($this->common_lang['form.approbation.not'], WebLink::NOT_APPROVAL), new FormFieldSelectChoiceOption($this->common_lang['form.approbation.now'], WebLink::APPROVAL_NOW), new FormFieldSelectChoiceOption($this->common_lang['status.approved.date'], WebLink::APPROVAL_DATE)), array('events' => array('change' => '
if (HTMLForms.getField("approbation_type").getValue() == 2) {
jQuery("#' . __CLASS__ . '_start_date_field").show();
HTMLForms.getField("end_date_enabled").enable();
} else {
jQuery("#' . __CLASS__ . '_start_date_field").hide();
HTMLForms.getField("end_date_enabled").disable();
}'))));
$publication_fieldset->add_field(new FormFieldDateTime('start_date', $this->common_lang['form.date.start'], $this->get_weblink()->get_start_date() === null ? new Date() : $this->get_weblink()->get_start_date(), array('hidden' => $this->get_weblink()->get_approbation_type() != WebLink::APPROVAL_DATE)));
$publication_fieldset->add_field(new FormFieldCheckbox('end_date_enabled', $this->common_lang['form.date.end.enable'], $this->get_weblink()->is_end_date_enabled(), array('hidden' => $this->get_weblink()->get_approbation_type() != WebLink::APPROVAL_DATE, 'events' => array('click' => '
if (HTMLForms.getField("end_date_enabled").getValue()) {
HTMLForms.getField("end_date").enable();
} else {
HTMLForms.getField("end_date").disable();
}'))));
$publication_fieldset->add_field(new FormFieldDateTime('end_date', $this->common_lang['form.date.end'], $this->get_weblink()->get_end_date() === null ? new Date() : $this->get_weblink()->get_end_date(), array('hidden' => !$this->get_weblink()->is_end_date_enabled())));
}
$this->build_contribution_fieldset($form);
$fieldset->add_field(new FormFieldHidden('referrer', $request->get_url_referrer()));
$this->submit_button = new FormButtonDefaultSubmit();
$form->add_button($this->submit_button);
$form->add_button(new FormButtonReset());
$this->form = $form;
}
示例8: build_form
private function build_form()
{
$form = new HTMLForm(__CLASS__);
$fieldset = new FormFieldsetHTML('language-config', $this->lang['content.config.language']);
$form->add_fieldset($fieldset);
$fieldset->add_field(new FormFieldEditors('formatting_language', $this->lang['content.config.default-formatting-language'], $this->content_formatting_config->get_default_editor(), array('description' => $this->lang['content.config.default-formatting-language-explain'])));
$fieldset->add_field(new FormFieldMultipleSelectChoice('forbidden_tags', $this->lang['comments.config.forbidden-tags'], $this->content_formatting_config->get_forbidden_tags(), $this->generate_forbidden_tags_option(), array('size' => 10)));
$fieldset = new FormFieldsetHTML('html-language-config', $this->lang['content.config.html-language']);
$form->add_fieldset($fieldset);
$auth_settings = new AuthorizationsSettings(array(new ActionAuthorization($this->lang['content.config.html-language-use-authorization'], self::HTML_USAGE_AUTHORIZATIONS, $this->lang['content.config.html-language-use-authorization-explain'])));
$auth_settings->build_from_auth_array($this->content_formatting_config->get_html_tag_auth());
$auth_setter = new FormFieldAuthorizationsSetter('authorizations', $auth_settings);
$fieldset->add_field($auth_setter);
$fieldset = new FormFieldsetHTML('post-management', $this->lang['content.config.post-management']);
$form->add_fieldset($fieldset);
$fieldset->add_field(new FormFieldNumberEditor('max_pm_number', $this->lang['content.config.max-pm-number'], $this->user_accounts_config->get_max_private_messages_number(), array('required' => true, 'description' => $this->lang['content.config.max-pm-number-explain']), array(new FormFieldConstraintRegex('`^([0-9]+)$`i', '', LangLoader::get_message('form.doesnt_match_number_regex', 'status-messages-common')))));
$fieldset->add_field(new FormFieldCheckbox('anti_flood_enabled', $this->lang['content.config.anti-flood-enabled'], $this->content_management_config->is_anti_flood_enabled(), array('description' => $this->lang['content.config.anti-flood-enabled-explain'])));
$fieldset->add_field(new FormFieldNumberEditor('delay_flood', $this->lang['content.config.delay-flood'], $this->content_management_config->get_anti_flood_duration(), array('required' => true, 'description' => $this->lang['content.config.delay-flood-explain']), array(new FormFieldConstraintRegex('`^([0-9]+)$`i', '', LangLoader::get_message('form.doesnt_match_number_regex', 'status-messages-common')))));
$fieldset = new FormFieldsetHTML('captcha', $this->lang['content.config.captcha']);
$form->add_fieldset($fieldset);
$fieldset->add_field(new FormFieldSimpleSelectChoice('captcha_used', $this->lang['content.config.captcha-used'], $this->content_management_config->get_used_captcha_module(), $this->generate_captcha_available_option(), array('description' => $this->lang['content.config.captcha-used-explain'])));
$this->submit_button = new FormButtonDefaultSubmit();
$form->add_button($this->submit_button);
$form->add_button(new FormButtonReset());
$this->form = $form;
}
示例9: build_form
private function build_form()
{
$form = new HTMLForm(__CLASS__);
$fieldset = new FormFieldsetHTML('advanced-config', $this->lang['advanced-config']);
$form->add_fieldset($fieldset);
$fieldset->add_field(new FormFieldUrlEditor('site_url', $this->lang['advanced-config.site_url'], $this->general_config->get_site_url(), array('description' => $this->lang['advanced-config.site_url-explain'], 'required' => true)));
$fieldset->add_field(new FormFieldTextEditor('site_path', $this->lang['advanced-config.site_path'], $this->general_config->get_site_path(), array('description' => $this->lang['advanced-config.site_path-explain'])));
$fieldset->add_field(new FormFieldTimezone('site_timezone', $this->lang['advanced-config.site_timezone'], $this->general_config->get_site_timezone(), array('description' => $this->lang['advanced-config.site_timezone-explain'])));
$url_rewriting_fieldset = new FormFieldsetHTML('url_rewriting', $this->lang['advanced-config.url-rewriting']);
$form->add_fieldset($url_rewriting_fieldset);
$url_rewriting_fieldset->set_description($this->lang['advanced-config.url-rewriting.explain']);
$server_configuration = new ServerConfiguration();
try {
if ($server_configuration->has_url_rewriting()) {
$url_rewriting_fieldset->add_field(new FormFieldCheckbox('url_rewriting_enabled', $this->lang['advanced-config.url-rewriting'], $this->server_environment_config->is_url_rewriting_enabled(), array('description' => '<span class="text-strong color-available">' . $this->lang['advanced-config.config.available'] . '</span>')));
} else {
$url_rewriting_fieldset->add_field(new FormFieldCheckbox('url_rewriting_enabled', $this->lang['advanced-config.url-rewriting'], FormFieldCheckbox::UNCHECKED, array('disabled' => true, 'description' => '<span class="text-strong color-notavailable">' . $this->lang['advanced-config.config.not-available'] . '</span>')));
}
} catch (UnsupportedOperationException $ex) {
$url_rewriting_fieldset->add_field(new FormFieldCheckbox('url_rewriting_enabled', $this->lang['advanced-config.url-rewriting'], $this->server_environment_config->is_url_rewriting_enabled(), array('description' => '<span class="text-strong color-unknown">' . $this->lang['advanced-config.config.unknown'] . '</span>')));
}
$htaccess_manual_content_fieldset = new FormFieldsetHTML('htaccess_manual_content', $this->lang['advanced-config.htaccess-manual-content']);
$form->add_fieldset($htaccess_manual_content_fieldset);
$htaccess_manual_content_fieldset->add_field(new FormFieldMultiLineTextEditor('htaccess_manual_content', $this->lang['advanced-config.htaccess-manual-content'], $this->server_environment_config->get_htaccess_manual_content(), array('rows' => 7, 'description' => $this->lang['advanced-config.htaccess-manual-content.explain'])));
$robots_file = new File(PATH_TO_ROOT . '/robots.txt');
$robots_content = $robots_file->exists() ? $robots_file->read() : '';
$robots_content_fieldset = new FormFieldsetHTML('robots_content', $this->lang['advanced-config.robots-content']);
$form->add_fieldset($robots_content_fieldset);
$robots_content_fieldset->add_field(new FormFieldMultiLineTextEditor('robots_content', $this->lang['advanced-config.robots-content'], $robots_content, array('rows' => 7, 'description' => $this->lang['advanced-config.robots-content.explain'])));
$sessions_config_fieldset = new FormFieldsetHTML('sessions_config', $this->lang['advanced-config.sessions-config']);
$form->add_fieldset($sessions_config_fieldset);
$sessions_config_fieldset->add_field(new FormFieldTextEditor('cookie_name', $this->lang['advanced-config.cookie-name'], $this->sessions_config->get_cookie_name(), array('required' => true), array(new FormFieldConstraintRegex('`^[A-Za-z0-9]+$`i', '', $this->lang['advanced-config.cookie-name.style-wrong']))));
$sessions_config_fieldset->add_field(new FormFieldNumberEditor('session_duration', $this->lang['advanced-config.cookie-duration'], $this->sessions_config->get_session_duration(), array('description' => $this->lang['advanced-config.cookie-duration.explain'], 'required' => true), array(new FormFieldConstraintRegex('`^[0-9]+$`i', '', $this->lang['advanced-config.integer-required']))));
$sessions_config_fieldset->add_field(new FormFieldNumberEditor('active_session_duration', $this->lang['advanced-config.active-session-duration'], $this->sessions_config->get_active_session_duration(), array('description' => $this->lang['advanced-config.active-session-duration.explain'], 'required' => true), array(new FormFieldConstraintRegex('`^[0-9]+$`i', '', $this->lang['advanced-config.integer-required']))));
$miscellaneous_fieldset = new FormFieldsetHTML('miscellaneous', $this->lang['advanced-config.miscellaneous']);
$form->add_fieldset($miscellaneous_fieldset);
if (function_exists('ob_gzhandler') && @extension_loaded('zlib')) {
$miscellaneous_fieldset->add_field(new FormFieldCheckbox('output_gziping_enabled', $this->lang['advanced-config.output-gziping-enabled'], $this->server_environment_config->is_output_gziping_enabled(), array('description' => '<span class="text-strong color-available">' . $this->lang['advanced-config.config.available'] . '</span>')));
} else {
$miscellaneous_fieldset->add_field(new FormFieldCheckbox('output_gziping_enabled', $this->lang['advanced-config.output-gziping-enabled'], FormFieldCheckbox::UNCHECKED, array('description' => '<span class="text-strong color-notavailable">' . $this->lang['advanced-config.config.not-available'] . '</span>', 'disabled' => true)));
}
$miscellaneous_fieldset->add_field(new FormFieldCheckbox('debug_mode_enabled', $this->lang['advanced-config.debug-mode'], Debug::is_debug_mode_enabled(), array('description' => $this->lang['advanced-config.debug-mode.explain'], 'events' => array('change' => '
if (HTMLForms.getField("debug_mode_enabled").getValue()) {
HTMLForms.getField("debug_mode_type").enable();
HTMLForms.getField("display_database_query_enabled").enable();
} else {
HTMLForms.getField("debug_mode_type").disable();
HTMLForms.getField("display_database_query_enabled").disable();
}'))));
$miscellaneous_fieldset->add_field(new FormFieldSimpleSelectChoice('debug_mode_type', $this->lang['advanced-config.debug-mode.type'], Debug::is_strict_mode_enabled(), array(new FormFieldSelectChoiceOption($this->lang['advanced-config.debug-mode.type.normal'], '0'), new FormFieldSelectChoiceOption($this->lang['advanced-config.debug-mode.type.strict'], '1')), array('hidden' => !Debug::is_debug_mode_enabled())));
$miscellaneous_fieldset->add_field(new FormFieldCheckbox('display_database_query_enabled', $this->lang['advanced-config.debug-display-database-query-enabled'], Debug::is_display_database_query_enabled(), array('hidden' => !Debug::is_debug_mode_enabled())));
$this->submit_button = new FormButtonDefaultSubmit();
$form->add_button($this->submit_button);
$form->add_button(new FormButtonReset());
$this->form = $form;
}
示例10: build_form
private function build_form()
{
$this->form = new HTMLForm('sitemap_global_config', SitemapUrlBuilder::get_general_config()->rel());
$fieldset = new FormFieldsetHTML('general_config', $this->lang['general_config']);
$this->form->add_fieldset($fieldset);
$fieldset->add_field(new FormFieldCheckbox('enable_sitemap_xml', $this->lang['auto_generate_xml_file'], SitemapXMLFileService::is_xml_file_generation_enabled() ? FormFieldCheckbox::CHECKED : FormFieldCheckbox::UNCHECKED, array('events' => array('click' => 'if ($FF("enable_sitemap_xml").getValue()) { $FF("file_life_time").enable(); } else { $FF("file_life_time").disable(); }'))));
$fieldset->add_field(new FormFieldNumberEditor('file_life_time', $this->lang['xml_file_life_time'], SitemapXMLFileService::get_life_time(), array('required' => true, 'min' => 0, 'description' => $this->lang['xml_file_life_time_explain'], 'hidden' => !SitemapXMLFileService::is_xml_file_generation_enabled()), array(new FormFieldConstraintIntegerRange(1, 50))));
$this->submit_button = new FormButtonDefaultSubmit();
$this->form->add_button($this->submit_button);
$this->form->add_button(new FormButtonReset());
}
示例11: build_form
private function build_form()
{
$this->form = new HTMLForm('continueForm', '', false);
$action_fieldset = new FormFieldsetSubmit('actions');
$back = new FormButtonLinkCssImg($this->lang['step.previous'], UpdateUrlBuilder::introduction(), 'fa fa-arrow-left');
$action_fieldset->add_element($back);
$refresh = new FormButtonLinkCssImg($this->lang['folders.chmod.refresh'], UpdateUrlBuilder::server_configuration()->rel(), 'fa fa-refresh');
$action_fieldset->add_element($refresh);
$this->submit = new FormButtonSubmitCssImg($this->lang['step.next'], 'fa fa-arrow-right', 'server');
$action_fieldset->add_element($this->submit);
$this->form->add_fieldset($action_fieldset);
}
示例12: build_form
private function build_form()
{
$admin_user_lang = LangLoader::get('admin-user-common');
$this->form = new HTMLForm('websiteForm', '', false);
$fieldset = new FormFieldsetHTML('yourSite', $this->lang['website.yours']);
$this->form->add_fieldset($fieldset);
$host = new FormFieldUrlEditor('host', $this->lang['website.host'], $this->current_server_host(), array('description' => $this->lang['website.host.explanation'], 'required' => $this->lang['website.host.required']));
$host->add_event('change', $this->warning_if_not_equals($host, $this->lang['website.host.warning']));
$fieldset->add_field($host);
$path = new FormFieldTextEditor('path', $this->lang['website.path'], $this->current_server_path(), array('description' => $this->lang['website.path.explanation']));
$path->add_event('change', $this->warning_if_not_equals($path, $this->lang['website.path.warning']));
$fieldset->add_field($path);
$fieldset->add_field(new FormFieldTextEditor('name', $this->lang['website.name'], '', array('required' => $this->lang['website.name.required'])));
$fieldset->add_field(new FormFieldTextEditor('slogan', $this->lang['website.slogan'], ''));
$fieldset->add_field(new FormFieldMultiLineTextEditor('description', $this->lang['website.description'], '', array('description' => $this->lang['website.description.explanation'])));
$fieldset->add_field(new FormFieldTimezone('timezone', $this->lang['website.timezone'], 'Europe/Paris', array('description' => $this->lang['website.timezone.explanation'])));
$fieldset = new FormFieldsetHTML('security_config', $admin_user_lang['members.config-security']);
$this->form->add_fieldset($fieldset);
$fieldset->add_field(new FormFieldNumberEditor('internal_password_min_length', $admin_user_lang['security.config.internal-password-min-length'], $this->security_config->get_internal_password_min_length(), array('min' => 6, 'max' => 30), array(new FormFieldConstraintRegex('`^[0-9]+$`i'), new FormFieldConstraintIntegerRange(6, 30))));
$fieldset->add_field(new FormFieldSimpleSelectChoice('internal_password_strength', $admin_user_lang['security.config.internal-password-strength'], $this->security_config->get_internal_password_strength(), array(new FormFieldSelectChoiceOption($admin_user_lang['security.config.internal-password-strength.weak'], SecurityConfig::PASSWORD_STRENGTH_WEAK), new FormFieldSelectChoiceOption($admin_user_lang['security.config.internal-password-strength.medium'], SecurityConfig::PASSWORD_STRENGTH_MEDIUM), new FormFieldSelectChoiceOption($admin_user_lang['security.config.internal-password-strength.strong'], SecurityConfig::PASSWORD_STRENGTH_STRONG))));
$fieldset->add_field(new FormFieldCheckbox('login_and_email_forbidden_in_password', $admin_user_lang['security.config.login-and-email-forbidden-in-password'], $this->security_config->are_login_and_email_forbidden_in_password()));
if ($this->server_configuration->has_curl_library()) {
$fieldset = new FormFieldsetHTML('authentication_config', $admin_user_lang['members.config-authentication']);
$this->form->add_fieldset($fieldset);
$fieldset->add_field(new FormFieldCheckbox('fb_auth_enabled', $admin_user_lang['authentication.config.fb-auth-enabled'], $this->authentication_config->is_fb_auth_enabled(), array('description' => $admin_user_lang['authentication.config.fb-auth-enabled-explain'], 'events' => array('click' => '
if (HTMLForms.getField("fb_auth_enabled").getValue()) {
HTMLForms.getField("fb_app_id").enable();
HTMLForms.getField("fb_app_key").enable();
} else {
HTMLForms.getField("fb_app_id").disable();
HTMLForms.getField("fb_app_key").disable();
}'))));
$fieldset->add_field(new FormFieldTextEditor('fb_app_id', $admin_user_lang['authentication.config.fb-app-id'], $this->authentication_config->get_fb_app_id(), array('required' => true, 'hidden' => !$this->authentication_config->is_fb_auth_enabled())));
$fieldset->add_field(new FormFieldPasswordEditor('fb_app_key', $admin_user_lang['authentication.config.fb-app-key'], $this->authentication_config->get_fb_app_key(), array('required' => true, 'hidden' => !$this->authentication_config->is_fb_auth_enabled())));
$fieldset->add_field(new FormFieldCheckbox('google_auth_enabled', $admin_user_lang['authentication.config.google-auth-enabled'], $this->authentication_config->is_google_auth_enabled(), array('description' => $admin_user_lang['authentication.config.google-auth-enabled-explain'], 'events' => array('click' => '
if (HTMLForms.getField("google_auth_enabled").getValue()) {
HTMLForms.getField("google_client_id").enable();
HTMLForms.getField("google_client_secret").enable();
} else {
HTMLForms.getField("google_client_id").disable();
HTMLForms.getField("google_client_secret").disable();
}'))));
$fieldset->add_field(new FormFieldTextEditor('google_client_id', $admin_user_lang['authentication.config.google-client-id'], $this->authentication_config->get_google_client_id(), array('required' => true, 'hidden' => !$this->authentication_config->is_google_auth_enabled())));
$fieldset->add_field(new FormFieldPasswordEditor('google_client_secret', $admin_user_lang['authentication.config.google-client-secret'], $this->authentication_config->get_google_client_secret(), array('required' => true, 'hidden' => !$this->authentication_config->is_google_auth_enabled())));
}
$action_fieldset = new FormFieldsetSubmit('actions');
$back = new FormButtonLinkCssImg($this->lang['step.previous'], InstallUrlBuilder::database(), 'fa fa-arrow-left');
$action_fieldset->add_element($back);
$this->submit_button = new FormButtonSubmitCssImg($this->lang['step.next'], 'fa fa-arrow-right', 'website');
$action_fieldset->add_element($this->submit_button);
$this->form->add_fieldset($action_fieldset);
}
示例13: build_form
private function build_form(HTTPRequestCustom $request)
{
$security_config = SecurityConfig::load();
$form = new HTMLForm(__CLASS__);
$fieldset = new FormFieldsetHTML('add_member', LangLoader::get_message('members.add-member', 'admin-user-common'));
$form->add_fieldset($fieldset);
$fieldset->add_field(new FormFieldTextEditor('display_name', $this->lang['display_name'], '', array('maxlength' => 100, 'required' => true, 'events' => array('blur' => '
if (!HTMLForms.getField("login").getValue() && HTMLForms.getField("display_name").validate() == "") {
HTMLForms.getField("login").setValue(HTMLForms.getField("display_name").getValue().replace(/\\s/g, \'\'));
HTMLForms.getField("login").enableValidationMessage();
HTMLForms.getField("login").liveValidate();
}')), array(new FormFieldConstraintLengthRange(3, 100), new FormFieldConstraintDisplayNameExists())));
$fieldset->add_field($email = new FormFieldMailEditor('email', $this->lang['email'], '', array('required' => true), array(new FormFieldConstraintMailExist())));
$fieldset->add_field(new FormFieldCheckbox('custom_login', $this->lang['login.custom'], false, array('events' => array('click' => '
if (HTMLForms.getField("custom_login").getValue()) {
HTMLForms.getField("login").enable();
} else {
HTMLForms.getField("login").disable();
}'))));
$fieldset->add_field($login = new FormFieldTextEditor('login', $this->lang['login'], '', array('required' => true, 'hidden' => true, 'maxlength' => 25), array(new FormFieldConstraintLengthRange(3, 25), new FormFieldConstraintPHPBoostAuthLoginExists())));
$fieldset->add_field($password = new FormFieldPasswordEditor('password', $this->lang['password'], '', array('required' => true), array(new FormFieldConstraintLengthMin($security_config->get_internal_password_min_length()), new FormFieldConstraintPasswordStrength())));
$fieldset->add_field($password_bis = new FormFieldPasswordEditor('password_bis', $this->lang['password.confirm'], '', array('required' => true), array(new FormFieldConstraintLengthMin($security_config->get_internal_password_min_length()), new FormFieldConstraintPasswordStrength())));
$form->add_constraint(new FormConstraintFieldsEquality($password, $password_bis));
if ($security_config->are_login_and_email_forbidden_in_password()) {
$form->add_constraint(new FormConstraintFieldsInequality($email, $password));
$form->add_constraint(new FormConstraintFieldsInequality($login, $password));
}
$fieldset->add_field(new FormFieldRanksSelect('rank', $this->lang['rank'], FormFieldRanksSelect::MEMBER));
$fieldset->add_field(new FormFieldHidden('referrer', $request->get_url_referrer()));
$this->submit_button = new FormButtonDefaultSubmit();
$form->add_constraint(new FormConstraintFieldsEquality($password, $password_bis));
$form->add_button($this->submit_button);
$form->add_button(new FormButtonReset());
$this->form = $form;
}
示例14: build_form
private function build_form()
{
$form = new HTMLForm(__CLASS__);
$fieldset = new FormFieldsetHTML('general-config', $this->lang['general-config']);
$form->add_fieldset($fieldset);
$fieldset->add_field(new FormFieldTextEditor('site_name', $this->lang['general-config.site_name'], $this->general_config->get_site_name(), array('required' => true)));
$fieldset->add_field(new FormFieldTextEditor('site_slogan', $this->lang['general-config.site_slogan'], $this->general_config->get_site_slogan()));
$fieldset->add_field(new FormFieldShortMultiLineTextEditor('site_description', $this->lang['general-config.site_description'], $this->general_config->get_site_description(), array('rows' => 4, 'description' => $this->lang['general-config.site_description-explain'])));
$fieldset->add_field(new FormFieldLangsSelect('default_language', $this->lang['general-config.default_language'], $this->user_accounts_config->get_default_lang(), array('required' => true)));
$fieldset->add_field(new FormFieldThemesSelect('default_theme', $this->lang['general-config.default_theme'], $this->user_accounts_config->get_default_theme(), array('required' => true, 'events' => array('change' => $this->construct_javascript_picture_theme() . ' var theme_id = HTMLForms.getField("default_theme").getValue();
jQuery(\'#img_theme\').attr(\'src\', theme[theme_id]);
jQuery(\'#preview_theme\').attr(\'href\', theme[theme_id]);'))));
$fieldset->add_field(new FormFieldFree('picture_theme', $this->lang['general-config.theme_picture'], '<a href="' . $this->get_picture_theme() . '" data-lightbox="theme" data-rel="lightcase:collection" id="preview_theme" title="' . $this->lang['general-config.theme_picture'] . '">
<img id="img_theme" src="' . $this->get_picture_theme() . '" alt="' . $this->lang['general-config.theme_picture'] . '" class="admin-theme-img" /></br>
(' . $this->lang['general-config.theme_preview_click'] . ')
</a>'));
$fieldset->add_field(new FormFieldSimpleSelectChoice('start_page', $this->lang['general-config.start_page'], $this->general_config->get_module_home_page(), $this->list_modules_home_page(), array('required' => false, 'events' => array('change' => 'if (HTMLForms.getField("start_page").getValue() == "other") {
HTMLForms.getField("other_start_page").enable();
} else {
HTMLForms.getField("other_start_page").disable();
}'))));
$fieldset->add_field(new FormFieldTextEditor('other_start_page', $this->lang['general-config.other_start_page'], $this->general_config->get_other_home_page(), array('required' => false, 'hidden' => $this->general_config->get_module_home_page() != 'other')));
$fieldset->add_field(new FormFieldCheckbox('visit_counter', $this->lang['general-config.visit_counter'], $this->graphical_environment_config->is_visit_counter_enabled()));
$fieldset->add_field(new FormFieldCheckbox('page_bench', $this->lang['general-config.page_bench'], $this->graphical_environment_config->is_page_bench_enabled(), array('description' => $this->lang['general-config.page_bench-explain'])));
$fieldset->add_field(new FormFieldCheckbox('display_theme_author', $this->lang['general-config.display_theme_author'], $this->graphical_environment_config->get_display_theme_author(), array('description' => $this->lang['general-config.display_theme_author-explain'])));
$this->submit_button = new FormButtonDefaultSubmit();
$form->add_button($this->submit_button);
$form->add_button(new FormButtonReset());
$this->form = $form;
}
示例15: build_form
private function build_form()
{
$form = new HTMLForm(__CLASS__);
$fieldset = new FormFieldsetHTML('configuration', LangLoader::get_message('configuration', 'admin-common'));
$form->add_fieldset($fieldset);
$fieldset->add_field(new FormFieldTextEditor('title', $this->lang['admin.config.title'], $this->config->get_title(), array('maxlength' => 255, 'required' => true)));
$fieldset->add_field(new FormFieldCheckbox('informations_enabled', $this->lang['admin.config.informations_enabled'], $this->config->are_informations_enabled(), array('description' => $this->lang['admin.config.informations.explain'], 'events' => array('click' => '
if (HTMLForms.getField("informations_enabled").getValue()) {
HTMLForms.getField("informations_position").enable();
HTMLForms.getField("informations").enable();
} else {
HTMLForms.getField("informations_position").disable();
HTMLForms.getField("informations").disable();
}'))));
$fieldset->add_field(new FormFieldSimpleSelectChoice('informations_position', $this->lang['admin.config.informations_position'], $this->config->get_informations_position(), array(new FormFieldSelectChoiceOption($this->lang['admin.config.informations.position_left'], ContactConfig::LEFT), new FormFieldSelectChoiceOption($this->lang['admin.config.informations.position_top'], ContactConfig::TOP), new FormFieldSelectChoiceOption($this->lang['admin.config.informations.position_right'], ContactConfig::RIGHT), new FormFieldSelectChoiceOption($this->lang['admin.config.informations.position_bottom'], ContactConfig::BOTTOM)), array('hidden' => !$this->config->are_informations_enabled())));
$fieldset->add_field(new FormFieldRichTextEditor('informations', $this->lang['admin.config.informations_content'], FormatingHelper::unparse($this->config->get_informations()), array('rows' => 8, 'cols' => 47, 'hidden' => !$this->config->are_informations_enabled())));
$fieldset->add_field(new FormFieldCheckbox('tracking_number_enabled', $this->lang['admin.config.tracking_number_enabled'], $this->config->is_tracking_number_enabled(), array('events' => array('click' => '
if (HTMLForms.getField("tracking_number_enabled").getValue()) {
HTMLForms.getField("date_in_tracking_number_enabled").enable();
} else {
HTMLForms.getField("date_in_tracking_number_enabled").disable();
}'))));
$fieldset->add_field(new FormFieldCheckbox('date_in_tracking_number_enabled', $this->lang['admin.config.date_in_date_in_tracking_number_enabled'], $this->config->is_date_in_tracking_number_enabled(), array('description' => $this->lang['admin.config.date_in_date_in_tracking_number_enabled.explain'], 'hidden' => !$this->config->is_tracking_number_enabled())));
$fieldset->add_field(new FormFieldCheckbox('sender_acknowledgment_enabled', $this->lang['admin.config.sender_acknowledgment_enabled'], $this->config->is_sender_acknowledgment_enabled()));
$fieldset_authorizations = new FormFieldsetHTML('authorizations', LangLoader::get_message('authorizations', 'common'));
$form->add_fieldset($fieldset_authorizations);
$auth_settings = new AuthorizationsSettings(array(new ActionAuthorization($this->lang['admin.authorizations.read'], ContactAuthorizationsService::READ_AUTHORIZATIONS)));
$auth_settings->build_from_auth_array($this->config->get_authorizations());
$fieldset_authorizations->add_field(new FormFieldAuthorizationsSetter('authorizations', $auth_settings));
$this->submit_button = new FormButtonDefaultSubmit();
$form->add_button($this->submit_button);
$form->add_button(new FormButtonReset());
$this->form = $form;
}