Rev 958 | Rev 1014 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
923 | 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" %> |
923 | 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.editdest.title" /></title> |
958 | dev | 13 | <link rel="stylesheet" type="text/css" href="<strutsx:root />/style/general.css"> |
923 | 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.editdest.title" /></h1> |
923 | 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> |
||
923 | 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.editdest.address" /></th> |
923 | dev | 84 | <td><bean:write name="alias" property="address" /></td> |
85 | <td> </td> |
||
86 | <td> </td> |
||
87 | <td> </td> |
||
88 | </tr> |
||
89 | <tr> |
||
924 | dev | 90 | <th><bean:message key="ak.hostadmiral.page.mail.alias.editdest.domain" /></th> |
923 | dev | 91 | <td><bean:write name="alias" property="domain.name" /></td> |
92 | <td> </td> |
||
93 | <td> </td> |
||
94 | <td> </td> |
||
95 | </tr> |
||
96 | <tr> |
||
924 | dev | 97 | <th><bean:message key="ak.hostadmiral.page.mail.alias.editdest.owner" /></th> |
923 | dev | 98 | <td><bean:write name="alias" property="owner.login" /></td> |
99 | <td> </td> |
||
100 | <td> </td> |
||
101 | <td> </td> |
||
102 | </tr> |
||
103 | <tr> |
||
924 | dev | 104 | <th><bean:message key="ak.hostadmiral.page.mail.alias.editdest.enabled" /></th> |
923 | dev | 105 | <td> |
106 | <logic:equal name="alias" property="enabled" value="true"> |
||
924 | dev | 107 | <bean:message key="ak.hostadmiral.page.mail.box.view.enabled.true" /> |
923 | dev | 108 | </logic:equal> |
109 | <logic:notEqual name="alias" property="enabled" value="true"> |
||
924 | dev | 110 | <bean:message key="ak.hostadmiral.page.mail.box.view.enabled.false" /> |
923 | dev | 111 | </logic:notEqual> |
112 | </td> |
||
113 | <td> </td> |
||
114 | <td> </td> |
||
115 | <td> </td> |
||
116 | </tr> |
||
117 | <tr> |
||
924 | dev | 118 | <th><bean:message key="ak.hostadmiral.page.mail.alias.editdest.comment" /></th> |
923 | dev | 119 | <td><bean:write name="alias" property="comment" /> </td> |
120 | <td> </td> |
||
121 | <td> </td> |
||
122 | <td> </td> |
||
123 | </tr> |
||
124 | |||
125 | <tr> |
||
924 | dev | 126 | <th><bean:message key="ak.hostadmiral.page.mail.alias.editdest.header.tomailbox" /></th> |
127 | <th><bean:message key="ak.hostadmiral.page.mail.alias.editdest.header.toexternal" /></th> |
||
128 | <th><bean:message key="ak.hostadmiral.page.mail.alias.editdest.header.enabled" /></th> |
||
129 | <th><bean:message key="ak.hostadmiral.page.mail.alias.editdest.header.comment" /></th> |
||
923 | dev | 130 | <th> </th> |
131 | </tr> |
||
132 | |||
958 | dev | 133 | <logic:iterate name="MailAliasEditForm" property="dests" id="dests" indexId="iid"> |
923 | dev | 134 | <tr> |
135 | <td> |
||
136 | <html:hidden name="dests" property="id" indexed="true" /> |
||
137 | <html:select name="dests" property="mailbox" indexed="true" onchange="mailboxChanged(this)"> |
||
924 | dev | 138 | <html:option value="" key="ak.hostadmiral.page.mail.alias.editdest.external"/> |
923 | dev | 139 | <html:options collection="mailboxes" property="id" labelProperty="login" /> |
140 | </html:select> |
||
141 | </td> |
||
142 | <td><html:text name="dests" property="email" indexed="true" /></td> |
||
143 | <td><html:checkbox name="dests" property="enabled" indexed="true" /></td> |
||
144 | <td><html:text name="dests" property="comment" indexed="true" /></td> |
||
924 | dev | 145 | <td><html:submit property="delete.dests" indexed="true"><bean:message key="ak.hostadmiral.page.mail.alias.editdest.delete" /></html:submit></td> |
923 | dev | 146 | </tr> |
147 | </logic:iterate> |
||
148 | |||
149 | <tr> |
||
924 | dev | 150 | <td colspan=5><html:submit property="add"><bean:message key="ak.hostadmiral.page.mail.alias.editdest.add" /></html:submit></td> |
923 | dev | 151 | <tr> |
152 | </tr> |
||
153 | <td colspan=5> |
||
924 | dev | 154 | <html:submit property="submit"><bean:message key="ak.hostadmiral.page.mail.alias.editdest.submit" /></html:submit> |
155 | <backpath:backlink><bean:message key="ak.hostadmiral.page.mail.alias.editdest.back" /></backpath:backlink> |
||
923 | dev | 156 | </td> |
157 | </tr> |
||
158 | </table> |
||
159 | |||
160 | </html:form> |
||
161 | <script>loadForm();</script> |
||
162 | |||
163 | </body> |
||
164 | |||
165 | </html> |