Subversion Repositories general

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
920 dev 1
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
2
<%@ taglib uri="/WEB-INF/struts-bean.tld"      prefix="bean"     %>
3
<%@ taglib uri="/WEB-INF/struts-logic.tld"     prefix="logic"    %>
4
<%@ taglib uri="/WEB-INF/struts-html.tld"      prefix="html"     %>
5
<%@ taglib uri="/WEB-INF/ak-backpath.tld"      prefix="backpath" %>
958 dev 6
<%@ taglib uri="/WEB-INF/ak-strutsx.tld"       prefix="strutsx"  %>
924 dev 7
<%@ taglib uri="/WEB-INF/hostadmiral-core.tld" prefix="core"     %>
920 dev 8
<html>
9
 
10
<head>
11
	<meta http-equiv="expires" content="0">
924 dev 12
	<title><bean:message key="ak.hostadmiral.page.mail.alias.edit.title" /></title>
958 dev 13
	<link rel="stylesheet" type="text/css" href="<strutsx:root />/style/general.css">
920 dev 14
	<script>
15
	    function submitForm()
16
	    {
17
	    	idx = 0;
18
	    	while(true) {
19
		    	var t = document.forms[0].elements["dests[" + (idx++) + "].email"];
20
		    	if(t) t.disabled = false;
21
		    	else break;
22
	    	}
23
	    }
24
 
25
	    function loadForm()
26
	    {
27
	    	idx = 0;
28
	    	while(true) {
29
		    	var s = document.forms[0].elements["dests[" + (idx++) + "].mailbox"];
30
		    	if(s) mailboxChanged(s);
31
		    	else break;
32
	    	}
33
	    }
34
 
35
	    function mailboxChanged(s)
36
	    {
37
	    	// extract index
38
	    	var name = s.name;
39
	    	var i1 = name.indexOf("[");
40
	    	var i2 = name.indexOf("]");
41
 
42
	    	if(i1 < 0 || i2 < 0) return;
43
 
44
	    	var idx = name.substring(i1+1, i2);
45
 
46
	    	// find text field
47
	    	var t = document.forms[0].elements["dests[" + idx + "].email"];
48
 
49
	        // change status
50
	    	if(t) {
51
	    		if(s.options[s.selectedIndex] && s.options[s.selectedIndex].value != '') {
52
	    		  t.disabled = true;
53
	    		}
54
	    		else {
55
	    		  t.disabled = false;
56
	    		}
57
	    	}
58
	    }
59
	</script>
60
</head>
61
 
62
<body>
63
 
924 dev 64
<h1><bean:message key="ak.hostadmiral.page.mail.alias.edit.title" /></h1>
920 dev 65
 
958 dev 66
<strutsx:errorsIterator id="errors" />
67
<strutsx:notEmpty name="errors">
68
	<div class="error"><bean:message key="ak.hostadmiral.page.general.errors" />:
69
		<ul>
70
		<logic:iterate name="errors" id="error">
71
			<li><strutsx:message name="error" property="key" valuesProperty="values" /></li>
72
		</logic:iterate>
73
		</ul>
74
	</div>
75
</strutsx:notEmpty>
920 dev 76
 
77
<html:form action="/mail/alias/submit" onsubmit="submitForm()">
78
<backpath:current/>
79
<html:hidden property="id" />
80
 
81
<table border=1>
82
	<tr>
924 dev 83
		<th><bean:message key="ak.hostadmiral.page.mail.alias.edit.address" /></th>
920 dev 84
		<td><html:text property="address" /></td>
85
		<td>&nbsp;</td>
86
		<td>&nbsp;</td>
87
		<td>&nbsp;</td>
88
    </tr>
89
	<tr>
924 dev 90
		<th><bean:message key="ak.hostadmiral.page.mail.alias.edit.domain" /></th>
920 dev 91
		<td>
92
			<html:select property="domain">
924 dev 93
				<html:option value="" key="ak.hostadmiral.page.mail.alias.edit.domain.empty"/>
920 dev 94
				<html:options collection="domains" property="id" labelProperty="name" />
95
			</html:select>
96
		</td>
97
		<td>&nbsp;</td>
98
		<td>&nbsp;</td>
99
		<td>&nbsp;</td>
100
    </tr>
101
	<tr>
924 dev 102
		<th><bean:message key="ak.hostadmiral.page.mail.alias.edit.owner" /></th>
920 dev 103
		<td>
104
			<html:select property="owner">
924 dev 105
				<html:option value="" key="ak.hostadmiral.page.mail.alias.edit.owner.empty"/>
920 dev 106
				<html:options collection="users" property="id" labelProperty="login" />
107
			</html:select>
108
		</td>
109
		<td>&nbsp;</td>
110
		<td>&nbsp;</td>
111
		<td>&nbsp;</td>
112
    </tr>
113
	<tr>
924 dev 114
		<th><bean:message key="ak.hostadmiral.page.mail.alias.edit.enabled" /></th>
920 dev 115
		<td><html:checkbox property="enabled" /></td>
116
		<td>&nbsp;</td>
117
		<td>&nbsp;</td>
118
		<td>&nbsp;</td>
119
    </tr>
120
	<tr>
924 dev 121
		<th><bean:message key="ak.hostadmiral.page.mail.alias.edit.comment" /></th>
920 dev 122
		<td><html:textarea property="comment" /></td>
123
		<td>&nbsp;</td>
124
		<td>&nbsp;</td>
125
		<td>&nbsp;</td>
126
    </tr>
127
 
128
	<tr>
924 dev 129
		<th><bean:message key="ak.hostadmiral.page.mail.alias.edit.header.tomailbox" /></th>
130
		<th><bean:message key="ak.hostadmiral.page.mail.alias.edit.header.toexternal" /></th>
131
		<th><bean:message key="ak.hostadmiral.page.mail.alias.edit.header.enabled" /></th>
132
		<th><bean:message key="ak.hostadmiral.page.mail.alias.edit.header.comment" /></th>
920 dev 133
		<th>&nbsp;</th>
134
	</tr>
135
 
958 dev 136
<logic:iterate name="MailAliasEditForm" property="dests" id="dests" indexId="iid">
920 dev 137
	<tr>
138
		<td>
139
			<html:hidden name="dests" property="id" indexed="true" />
140
			<html:select name="dests" property="mailbox" indexed="true" onchange="mailboxChanged(this)">
924 dev 141
				<html:option value="" key="ak.hostadmiral.page.mail.alias.edit.external"/>
920 dev 142
				<html:options collection="mailboxes" property="id" labelProperty="login" />
143
			</html:select>
144
		</td>
145
		<td><html:text name="dests" property="email" indexed="true" /></td>
146
		<td><html:checkbox name="dests" property="enabled" indexed="true" /></td>
147
		<td><html:text name="dests" property="comment" indexed="true" /></td>
924 dev 148
		<td><html:submit property="delete.dests" indexed="true"><bean:message key="ak.hostadmiral.page.mail.alias.edit.delete" /></html:submit></td>
920 dev 149
	</tr>
150
</logic:iterate>
151
 
152
	<tr>
924 dev 153
		<td colspan=5><html:submit property="add"><bean:message key="ak.hostadmiral.page.mail.alias.edit.add" /></html:submit></td>
920 dev 154
	<tr>
155
	</tr>
156
		<td colspan=5>
924 dev 157
			<html:submit property="submit"><bean:message key="ak.hostadmiral.page.mail.alias.edit.submit" /></html:submit>
158
            <backpath:backlink><bean:message key="ak.hostadmiral.page.mail.alias.edit.back" /></backpath:backlink>
920 dev 159
		</td>
160
	</tr>
161
</table>
162
 
163
</html:form>
164
<script>loadForm();</script>
165
 
166
</body>
167
 
168
</html>