Subversion Repositories general

Rev

Rev 905 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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