Skip to content

Commit 7c6e658

Browse files
committed
- Added server settings and getmail configuration form.
1 parent 92bc670 commit 7c6e658

File tree

5 files changed

+154
-5
lines changed

5 files changed

+154
-5
lines changed

interface/web/mail/form/spamfilter_config.tform.php

Lines changed: 97 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
$form["db_table"] = "server";
4141
$form["db_table_idx"] = "server_id";
4242
$form["db_history"] = "yes";
43-
$form["tab_default"] = "mail";
43+
$form["tab_default"] = "server";
4444
$form["list_default"] = "spamfilter_config_list.php";
4545
$form["auth"] = 'yes'; // yes / no
4646

@@ -50,8 +50,77 @@
5050
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
5151
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
5252

53+
$form["tabs"]['server'] = array (
54+
'title' => "Server",
55+
'width' => 100,
56+
'template' => "templates/spamfilter_config_server_edit.htm",
57+
'fields' => array (
58+
##################################
59+
# Begin Datatable fields
60+
##################################
61+
'ip_address' => array (
62+
'datatype' => 'VARCHAR',
63+
'formtype' => 'TEXT',
64+
'default' => '192.168.0.100',
65+
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
66+
'errmsg'=> 'ip_address_error_empty'),
67+
),
68+
'value' => '',
69+
'width' => '15',
70+
'maxlength' => '255'
71+
),
72+
'netmask' => array (
73+
'datatype' => 'VARCHAR',
74+
'formtype' => 'TEXT',
75+
'default' => '255.255.255.0',
76+
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
77+
'errmsg'=> 'netmask_error_empty'),
78+
),
79+
'value' => '',
80+
'width' => '15',
81+
'maxlength' => '255'
82+
),
83+
'gateway' => array (
84+
'datatype' => 'VARCHAR',
85+
'formtype' => 'TEXT',
86+
'default' => '192.168.0.1',
87+
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
88+
'errmsg'=> 'gateway_error_empty'),
89+
),
90+
'value' => '',
91+
'width' => '15',
92+
'maxlength' => '255'
93+
),
94+
'hostname' => array (
95+
'datatype' => 'VARCHAR',
96+
'formtype' => 'TEXT',
97+
'default' => 'server1.example.com',
98+
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
99+
'errmsg'=> 'hostname_error_empty'),
100+
),
101+
'value' => '',
102+
'width' => '40',
103+
'maxlength' => '255'
104+
),
105+
'nameservers' => array (
106+
'datatype' => 'VARCHAR',
107+
'formtype' => 'TEXT',
108+
'default' => '192.168.0.1,192.168.0.2',
109+
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
110+
'errmsg'=> 'nameservers_error_empty'),
111+
),
112+
'value' => '',
113+
'width' => '40',
114+
'maxlength' => '255'
115+
),
116+
##################################
117+
# ENDE Datatable fields
118+
##################################
119+
)
120+
);
121+
53122
$form["tabs"]['mail'] = array (
54-
'title' => "Mailserver",
123+
'title' => "Mail",
55124
'width' => 100,
56125
'template' => "templates/spamfilter_config_mail_edit.htm",
57126
'fields' => array (
@@ -176,5 +245,31 @@
176245
)
177246
);
178247

248+
$form["tabs"]['getmail'] = array (
249+
'title' => "Getmail",
250+
'width' => 100,
251+
'template' => "templates/spamfilter_config_getmail_edit.htm",
252+
'fields' => array (
253+
##################################
254+
# Begin Datatable fields
255+
##################################
256+
'getmail_config_dir' => array (
257+
'datatype' => 'VARCHAR',
258+
'formtype' => 'TEXT',
259+
'default' => '',
260+
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
261+
'errmsg'=> 'getmail_config_dir_error_empty'),
262+
),
263+
'value' => '',
264+
'width' => '40',
265+
'maxlength' => '255'
266+
),
267+
##################################
268+
# ENDE Datatable fields
269+
##################################
270+
)
271+
);
272+
273+
179274

180275
?>

interface/web/mail/lib/lang/en_spamfilter_config.lng

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
<?php
2+
$wb["getmail_config_dir_txt"] = 'Getmail Config Path';
3+
$wb["btn_save_txt"] = 'Save';
4+
$wb["btn_cancel_txt"] = 'Cancel';
5+
$wb["ip_address_txt"] = 'IP Address';
6+
$wb["netmask_txt"] = 'Netmask';
7+
$wb["gateway_txt"] = 'Gateway';
8+
$wb["hostname_txt"] = 'Hostname';
9+
$wb["nameservers_txt"] = 'Nameservers';
210
$wb["module_txt"] = 'Server Module';
311
$wb["maildir_path_txt"] = 'Maildir Path';
412
$wb["homedir_path_txt"] = 'Homedir Path';
@@ -11,6 +19,4 @@ $wb["relayhost_user_txt"] = 'Relayhost User';
1119
$wb["relayhost_password_txt"] = 'Relayhost Password';
1220
$wb["mailbox_size_limit_txt"] = 'Mailbox Size Limit';
1321
$wb["message_size_limit_txt"] = 'Message Size Limit';
14-
$wb["btn_save_txt"] = 'Save';
15-
$wb["btn_cancel_txt"] = 'Cancel';
1622
?>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<table width="500" border="0" cellspacing="0" cellpadding="2">
2+
<tr>
3+
<td class="frmText11">{tmpl_var name='getmail_config_dir_txt'}:</td>
4+
<td class="frmText11"><input name="getmail_config_dir" type="text" class="text" value="{tmpl_var name='getmail_config_dir'}" size="40" maxlength="255"></td>
5+
</tr> <tr>
6+
<td class="frmText11">&nbsp;</td>
7+
<td class="frmText11">&nbsp;</td>
8+
</tr>
9+
<tr>
10+
<td>&nbsp;</td>
11+
<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>&nbsp;
12+
<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>
13+
</td>
14+
</tr>
15+
</table>
16+
<input type="hidden" name="id" value="{tmpl_var name='id'}">

interface/web/mail/templates/spamfilter_config_list.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<tmpl_loop name="records">
1212
<tr bgcolor="{tmpl_var name="bgcolor"}">
1313
<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>
14-
<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>
14+
<td class="frmText11" align="right">[<a href="#" onClick="loadContent('mail/spamfilter_config_edit.php?id={tmpl_var name='id'}');" class="frmText11">Edit</a>]</td>
1515
</tr>
1616
</tmpl_loop>
1717

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<table width="500" border="0" cellspacing="0" cellpadding="2">
2+
<tr>
3+
<td class="frmText11">{tmpl_var name='ip_address_txt'}:</td>
4+
<td class="frmText11"><input name="ip_address" type="text" class="text" value="{tmpl_var name='ip_address'}" size="15" maxlength="255"></td>
5+
</tr>
6+
<tr>
7+
<td class="frmText11">{tmpl_var name='netmask_txt'}:</td>
8+
<td class="frmText11"><input name="netmask" type="text" class="text" value="{tmpl_var name='netmask'}" size="15" maxlength="255"></td>
9+
</tr>
10+
<tr>
11+
<td class="frmText11">{tmpl_var name='gateway_txt'}:</td>
12+
<td class="frmText11"><input name="gateway" type="text" class="text" value="{tmpl_var name='gateway'}" size="15" maxlength="255"></td>
13+
</tr>
14+
<tr>
15+
<td class="frmText11">{tmpl_var name='hostname_txt'}:</td>
16+
<td class="frmText11"><input name="hostname" type="text" class="text" value="{tmpl_var name='hostname'}" size="40" maxlength="255"></td>
17+
</tr>
18+
<tr>
19+
<td class="frmText11">{tmpl_var name='nameservers_txt'}:</td>
20+
<td class="frmText11"><input name="nameservers" type="text" class="text" value="{tmpl_var name='nameservers'}" size="40" maxlength="255"></td>
21+
</tr> <tr>
22+
<td class="frmText11">&nbsp;</td>
23+
<td class="frmText11">&nbsp;</td>
24+
</tr>
25+
<tr>
26+
<td>&nbsp;</td>
27+
<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>&nbsp;
28+
<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>
29+
</td>
30+
</tr>
31+
</table>
32+
<input type="hidden" name="id" value="{tmpl_var name='id'}">

0 commit comments

Comments
 (0)