addInput(new Form_Checkbox( 'disable_growl', 'Disable Growl', 'Disable Growl Notifications', $pconfig['disable_growl'] ))->setHelp('Check this option to disable growl notifications but preserve the '. 'settings below.'); $section->addInput(new Form_Input( 'name', 'Registration Name', 'text', $pconfig['name'], ['placeholder' => 'PHP-Growl'] ))->setHelp('Enter the name to register with the Growl server.'); $section->addInput(new Form_Input( 'notification_name', 'Notification Name', 'text', $pconfig['notification_name'], ['placeholder' => $g["product_name"].' growl alert'] ))->setHelp('Enter a name for the Growl notifications'); $section->addInput(new Form_Input( 'ipaddress', 'IP Address', 'text', $pconfig['ipaddress'] ))->setHelp('This is the IP address that you would like to send growl '. 'notifications to.'); $section->addInput(new Form_Input( 'password', 'Password', 'text', $pconfig['password'] ))->setHelp('Enter the password of the remote growl notification device.'); $section->addInput(new Form_Input( 'test-growl', 'Test Growl', 'submit', 'Test Growl settings' ))->addClass('btn-info')->setHelp('A test notification will be sent even if the service is '. 'marked as disabled.'); $form->add($section); $section = new Form_Section('E-Mail'); $section->addInput(new Form_Checkbox( 'disable_smtp', 'Disable SMTP', 'Disable SMTP Notifications', $pconfig['disable_smtp'] ))->setHelp('Check this option to disable SMTP notifications but preserve the '. 'settings below. Some other mechanisms, such as packages, may need these settings '. 'in place to function.'); $section->addInput(new Form_Input( 'smtpipaddress', 'E-Mail server', 'text', $pconfig['smtpipaddress'] ))->setHelp('This is the FQDN or IP address of the SMTP E-Mail server to '. 'which notifications will be sent.'); $section->addInput(new Form_Input( 'smtpport', 'SMTP Port of E-Mail server', 'number', $pconfig['smtpport'] ))->setHelp('This is the port of the SMTP E-Mail server, typically 25, 587 '. '(submission) or 465 (smtps)'); $group = new Form_Group('Secure SMTP Connection'); $group->add(new Form_Checkbox( 'smtpssl', 'Enable SSL/TLS', 'Enable SMTP over SSL/TLS', isset($pconfig['smtpssl']) )); $group->add(new Form_Checkbox( 'smtptls', 'Secure STARTTLS', 'Enable STARTTLS', isset($pconfig['smtptls']) )); $section->add($group); $section->addInput(new Form_Input( 'smtpfromaddress', 'From e-mail address', 'text', $pconfig['smtpfromaddress'] ))->setHelp('This is the e-mail address that will appear in the from field.'); $section->addInput(new Form_Input( 'smtpnotifyemailaddress', 'Notification E-Mail address', 'text', $pconfig['smtpnotifyemailaddress'] ))->setHelp('Enter the e-mail address that you would like email '. 'notifications sent to.'); // This name prevents the browser from auto-filling the field. We change it on submit $section->addInput(new Form_Input( 'smtpusername', 'Notification E-Mail auth username (optional)', 'text', $pconfig['smtpusername'], ['autocomplete' => 'off'] ))->setHelp('Enter the e-mail address username for SMTP authentication.'); $section->addInput(new Form_Input( 'smtppassword', 'Notification E-Mail auth password', 'password', $pconfig['smtppassword'] ))->setHelp('Enter the e-mail address password for SMTP authentication.'); $section->addInput(new Form_Select( 'smtpauthmech', 'Notification E-Mail auth mechanism', $pconfig['smtpauthmech'], $smtp_authentication_mechanisms ))->setHelp('Select the authentication mechanism used by the SMTP server. Most work with PLAIN, some servers like Exchange or Office365 might require LOGIN. '); $section->addInput(new Form_Input( 'test-smtp', 'Test SMTP', 'submit', 'Test SMTP settings' ))->addClass('btn-info')->setHelp('A test notification will be sent even if the service is '. 'marked as disabled. The last SAVED values will be used, not necessarily the values entered here.'); $form->add($section); $section = new Form_Section('Sounds'); $section->addInput(new Form_Checkbox( 'disablebeep', 'Startup/Shutdown Sound', 'Disable the startup/shutdown beep', $pconfig['disablebeep'] ))->setHelp('When this is checked, startup and shutdown sounds will no longer '. 'play.'); $form->add($section); print($form); include("foot.inc");