From 7c6e658a748fefdde18e27738ef7ded74cfad959 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Thu, 06 Sep 2007 11:41:54 -0400 Subject: [PATCH] - Added server settings and getmail configuration form. --- interface/web/mail/templates/spamfilter_config_server_edit.htm | 32 ++++++++++ interface/web/mail/form/spamfilter_config.tform.php | 99 ++++++++++++++++++++++++++++++++ interface/web/mail/templates/spamfilter_config_getmail_edit.htm | 16 +++++ interface/web/mail/lib/lang/en_spamfilter_config.lng | 10 ++ interface/web/mail/templates/spamfilter_config_list.htm | 2 5 files changed, 154 insertions(+), 5 deletions(-) diff --git a/interface/web/mail/form/spamfilter_config.tform.php b/interface/web/mail/form/spamfilter_config.tform.php index 0dece21..b3f42a9 100644 --- a/interface/web/mail/form/spamfilter_config.tform.php +++ b/interface/web/mail/form/spamfilter_config.tform.php @@ -40,7 +40,7 @@ $form["db_table"] = "server"; $form["db_table_idx"] = "server_id"; $form["db_history"] = "yes"; -$form["tab_default"] = "mail"; +$form["tab_default"] = "server"; $form["list_default"] = "spamfilter_config_list.php"; $form["auth"] = 'yes'; // yes / no @@ -50,8 +50,77 @@ $form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete $form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete +$form["tabs"]['server'] = array ( + 'title' => "Server", + 'width' => 100, + 'template' => "templates/spamfilter_config_server_edit.htm", + 'fields' => array ( + ################################## + # Begin Datatable fields + ################################## + 'ip_address' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '192.168.0.100', + 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', + 'errmsg'=> 'ip_address_error_empty'), + ), + 'value' => '', + 'width' => '15', + 'maxlength' => '255' + ), + 'netmask' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '255.255.255.0', + 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', + 'errmsg'=> 'netmask_error_empty'), + ), + 'value' => '', + 'width' => '15', + 'maxlength' => '255' + ), + 'gateway' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '192.168.0.1', + 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', + 'errmsg'=> 'gateway_error_empty'), + ), + 'value' => '', + 'width' => '15', + 'maxlength' => '255' + ), + 'hostname' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => 'server1.example.com', + 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', + 'errmsg'=> 'hostname_error_empty'), + ), + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), + 'nameservers' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '192.168.0.1,192.168.0.2', + 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', + 'errmsg'=> 'nameservers_error_empty'), + ), + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), + ################################## + # ENDE Datatable fields + ################################## + ) +); + $form["tabs"]['mail'] = array ( - 'title' => "Mailserver", + 'title' => "Mail", 'width' => 100, 'template' => "templates/spamfilter_config_mail_edit.htm", 'fields' => array ( @@ -176,5 +245,31 @@ ) ); +$form["tabs"]['getmail'] = array ( + 'title' => "Getmail", + 'width' => 100, + 'template' => "templates/spamfilter_config_getmail_edit.htm", + 'fields' => array ( + ################################## + # Begin Datatable fields + ################################## + 'getmail_config_dir' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', + 'errmsg'=> 'getmail_config_dir_error_empty'), + ), + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), + ################################## + # ENDE Datatable fields + ################################## + ) +); + + ?> \ No newline at end of file diff --git a/interface/web/mail/lib/lang/en_spamfilter_config.lng b/interface/web/mail/lib/lang/en_spamfilter_config.lng index 0303c4d..c7336bf 100644 --- a/interface/web/mail/lib/lang/en_spamfilter_config.lng +++ b/interface/web/mail/lib/lang/en_spamfilter_config.lng @@ -1,4 +1,12 @@ <?php +$wb["getmail_config_dir_txt"] = 'Getmail Config Path'; +$wb["btn_save_txt"] = 'Save'; +$wb["btn_cancel_txt"] = 'Cancel'; +$wb["ip_address_txt"] = 'IP Address'; +$wb["netmask_txt"] = 'Netmask'; +$wb["gateway_txt"] = 'Gateway'; +$wb["hostname_txt"] = 'Hostname'; +$wb["nameservers_txt"] = 'Nameservers'; $wb["module_txt"] = 'Server Module'; $wb["maildir_path_txt"] = 'Maildir Path'; $wb["homedir_path_txt"] = 'Homedir Path'; @@ -11,6 +19,4 @@ $wb["relayhost_password_txt"] = 'Relayhost Password'; $wb["mailbox_size_limit_txt"] = 'Mailbox Size Limit'; $wb["message_size_limit_txt"] = 'Message Size Limit'; -$wb["btn_save_txt"] = 'Save'; -$wb["btn_cancel_txt"] = 'Cancel'; ?> \ No newline at end of file diff --git a/interface/web/mail/templates/spamfilter_config_getmail_edit.htm b/interface/web/mail/templates/spamfilter_config_getmail_edit.htm new file mode 100644 index 0000000..e212657 --- /dev/null +++ b/interface/web/mail/templates/spamfilter_config_getmail_edit.htm @@ -0,0 +1,16 @@ +<table width="500" border="0" cellspacing="0" cellpadding="2"> + <tr> + <td class="frmText11">{tmpl_var name='getmail_config_dir_txt'}:</td> + <td class="frmText11"><input name="getmail_config_dir" type="text" class="text" value="{tmpl_var name='getmail_config_dir'}" size="40" maxlength="255"></td> + </tr> <tr> + <td class="frmText11"> </td> + <td class="frmText11"> </td> + </tr> + <tr> + <td> </td> + <td><input name="btn_save" type="button" class="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','mail/spamfilter_config_edit.php');"><div class="buttonEnding"></div> + <input name="btn_cancel" type="button" class="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('mail/spamfilter_config_list.php');"><div class="buttonEnding"></div> + </td> + </tr> +</table> +<input type="hidden" name="id" value="{tmpl_var name='id'}"> \ No newline at end of file diff --git a/interface/web/mail/templates/spamfilter_config_list.htm b/interface/web/mail/templates/spamfilter_config_list.htm index 08b5630..a78bcf2 100644 --- a/interface/web/mail/templates/spamfilter_config_list.htm +++ b/interface/web/mail/templates/spamfilter_config_list.htm @@ -11,7 +11,7 @@ <tmpl_loop name="records"> <tr bgcolor="{tmpl_var name="bgcolor"}"> <td class="frmText11"><a href="#" onClick="loadContent('mail/spamfilter_config_edit.php?id={tmpl_var name='id'}');" class="frmText11">{tmpl_var name="server_name"}</a></td> - <td class="frmText11" align="right">[<a href="javascript: del_record('mail/spamfilter_config_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}');" class="frmText11">{tmpl_var name='delete_txt'}</a>]</td> + <td class="frmText11" align="right">[<a href="#" onClick="loadContent('mail/spamfilter_config_edit.php?id={tmpl_var name='id'}');" class="frmText11">Edit</a>]</td> </tr> </tmpl_loop> diff --git a/interface/web/mail/templates/spamfilter_config_server_edit.htm b/interface/web/mail/templates/spamfilter_config_server_edit.htm new file mode 100644 index 0000000..1a8ca3f --- /dev/null +++ b/interface/web/mail/templates/spamfilter_config_server_edit.htm @@ -0,0 +1,32 @@ +<table width="500" border="0" cellspacing="0" cellpadding="2"> + <tr> + <td class="frmText11">{tmpl_var name='ip_address_txt'}:</td> + <td class="frmText11"><input name="ip_address" type="text" class="text" value="{tmpl_var name='ip_address'}" size="15" maxlength="255"></td> + </tr> + <tr> + <td class="frmText11">{tmpl_var name='netmask_txt'}:</td> + <td class="frmText11"><input name="netmask" type="text" class="text" value="{tmpl_var name='netmask'}" size="15" maxlength="255"></td> + </tr> + <tr> + <td class="frmText11">{tmpl_var name='gateway_txt'}:</td> + <td class="frmText11"><input name="gateway" type="text" class="text" value="{tmpl_var name='gateway'}" size="15" maxlength="255"></td> + </tr> + <tr> + <td class="frmText11">{tmpl_var name='hostname_txt'}:</td> + <td class="frmText11"><input name="hostname" type="text" class="text" value="{tmpl_var name='hostname'}" size="40" maxlength="255"></td> + </tr> + <tr> + <td class="frmText11">{tmpl_var name='nameservers_txt'}:</td> + <td class="frmText11"><input name="nameservers" type="text" class="text" value="{tmpl_var name='nameservers'}" size="40" maxlength="255"></td> + </tr> <tr> + <td class="frmText11"> </td> + <td class="frmText11"> </td> + </tr> + <tr> + <td> </td> + <td><input name="btn_save" type="button" class="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','mail/spamfilter_config_edit.php');"><div class="buttonEnding"></div> + <input name="btn_cancel" type="button" class="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('mail/spamfilter_config_list.php');"><div class="buttonEnding"></div> + </td> + </tr> +</table> +<input type="hidden" name="id" value="{tmpl_var name='id'}"> \ No newline at end of file -- Gitblit v1.9.1