[! use strict; use Proxmox::Form; use Proxmox::Utils; use Proxmox::ConfigServer; use Proxmox::Config::System; !] [- my $frm = Proxmox::Form->new (\%fdat); my $system_cfg = $fdat{__system_config}; $frm->add_cfg_element('spamquar', 'lifetime', "number", undef, __("Lifetime (days)")); $frm->add_cfg_element('spamquar', 'authmode', "dropdown", undef, __("Authentication mode"), [['ticket', __('Ticket')], ['ldap', __('LDAP')]]); $frm->add_cfg_element('spamquar', 'reportstyle', "dropdown", undef, __("Report Style"), [['verbose', __('Verbose')], ['short', __('Short')], ['custom', __('Custom')], ['none', __('No Reports')]]); $frm->add_cfg_element('spamquar', 'allowhttp', "bool", undef, __("Allow access via HTTP")); $frm->add_cfg_element('spamquar', "hostname", "text", "", __("Quarantine Host (optional)")); $frm->add_element("section_preview", "section", undef, __("Mail Preview Settings")); $frm->add_cfg_element('spamquar', 'viewimages', "bool", undef, __("View images")); $frm->add_cfg_element('spamquar', 'allowhrefs', "bool", undef, __("Allow HREFs")); if ($frm->submit==0) { $frm->load_cfg ($system_cfg); } else { if ($udat{AM} eq 'w') { $frm->save_cfg ($system_cfg); my $conn = Proxmox::ConfigClient::connect (); #$conn->rewrite_config_spam (); eval { $conn->service_cmd ('apache', 'restart'); }; #$conn->service_cmd ('proxprox', 'restart'); } else { $udat{popup_error} = Proxmox::Utils::msg ('nowr'); } } print OUT $frm->out_form; -]