root/trunk/deployment/resources/xsl/default/default/errors.xsl

Revision 1301 (checked in by johnsa, 6 years ago)

user client:

set scheduling method in edit form
added an error message for changing scheduling

method

  • Property svn:eol-style set to LF
Line 
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3   <!-- Apart from the exception - trapped first, these are in alphabetic order of
4        error code. -->
5   <xsl:template match="error">
6     <xsl:choose>
7       <xsl:when test="id='org.bedework.client.error.exc'"><!-- trap exceptions first -->
8         An exception occurred: <em><xsl:value-of select="param"/></em>
9       </xsl:when>
10       <xsl:when test="id='edu.rpi.sss.util.error.exc'">
11         An exception occurred: <em><xsl:value-of select="param"/></em>
12       </xsl:when>
13
14       <!-- client.error messages generally do not quite constitute validation errors
15            which mostly involve changing a field content.
16            Usually when we flag a data error here, it is due to a bug in the xsl -->
17       <xsl:when test="id='org.bedework.client.error.alreadymember'">
18         Error: already a member: <em><xsl:value-of select="param"/></em>
19       </xsl:when>
20       <xsl:when test="id='org.bedework.client.error.badinterval'">
21         Error: bad interval.
22       </xsl:when>
23       <xsl:when test="id='org.bedework.client.error.badintervalunit'">
24         Error: bad interval unit.
25       </xsl:when>
26       <xsl:when test="id='org.bedework.client.error.badrequest'">
27         Error: Bad request.
28       </xsl:when>
29       <xsl:when test="id='org.bedework.client.error.badschedulewhat'">
30         Error: Bad scheduling what parameter.
31       </xsl:when>
32       <xsl:when test="id='org.bedework.client.error.calsuitenotadded'">
33         Error: calendar suite not added.
34       </xsl:when>
35       <xsl:when test="id='org.bedework.client.error.cannotchangecalmode'">
36         Forbidden: you are not allowed to change the mode of the non-empty
37         collection <em><xsl:value-of select="param"/></em>.
38       </xsl:when>
39       <xsl:when test="id='org.bedework.client.error.choosegroupsuppressed'">
40         Error: choose group is suppressed.  You cannot perform that action at this time.
41       </xsl:when>
42       <xsl:when test="id='org.bedework.client.error.duplicatecontact'">
43         Cannot add: the contact already exists.
44       </xsl:when>
45       <xsl:when test="id='org.bedework.client.error.duplicategroup'">
46         Error: duplicate group.  <em><xsl:value-of select="param"/></em> already exists.
47       </xsl:when>
48       <xsl:when test="id='org.bedework.client.error.duplicatelocation'">
49         Cannot add: the location already exists.
50       </xsl:when>
51       <xsl:when test="id='org.bedework.client.error.duplicateuid'">
52           Duplicate uid: this event already exists in this calendar.
53       </xsl:when>
54       <xsl:when test="id='org.bedework.client.error.failed.overrides'">
55           Error: there were <xsl:value-of select="param"/> failed overrides.
56       </xsl:when>
57       <xsl:when test="id='org.bedework.client.error.mail.norecipient'">
58         Error: the email has no recipient.
59       </xsl:when>
60       <xsl:when test="id='org.bedework.client.error.missingcalendarpath'">
61         Error: missing calendar path.
62       </xsl:when>
63       <xsl:when test="id='org.bedework.client.error.missingeventkeyfields'">
64         Error: missing event key fields
65       </xsl:when>
66       <xsl:when test="id='org.bedework.client.error.missingfilename'">
67           You must supply a file name (required).
68       </xsl:when>
69       <xsl:when test="id='org.bedework.client.error.missingrequestpar'">
70           Missing request parameter: <em><xsl:value-of select="param"/></em>.
71       </xsl:when>
72       <xsl:when test="id='org.bedework.client.error.missingschedulewhat'">
73         Error: Missing scheduling what parameter.
74       </xsl:when>
75       <xsl:when test="id='org.bedework.client.error.multipleevents'">
76         System Error: Multiple events when one expected.
77       </xsl:when>
78       <xsl:when test="id='org.bedework.client.error.noaccess'">
79         Error: no access.
80       </xsl:when>
81       <xsl:when test="id='org.bedework.client.error.nodefaultview'">
82           No default view defined
83       </xsl:when>
84       <xsl:when test="id='org.bedework.client.error.norecurrenceinstances'">
85           There are no instances for this recurring event.
86       </xsl:when>
87       <xsl:when test="id='org.bedework.client.error.noschedulingaccess'">
88           You cannot schedule events with user <em><xsl:value-of select="param"/></em>.
89       </xsl:when>
90       <xsl:when test="id='org.bedework.client.error.ongrouppath'">
91         Error: group may not be added to itself.
92       </xsl:when>
93       <xsl:when test="id='org.bedework.client.error.onlyfrominbox'">
94         You can only respond from your inbox.
95       </xsl:when>
96       <xsl:when test="id='org.bedework.client.error.onlytoinbox'">
97         You can only reply to an inbox.
98       </xsl:when>
99       <xsl:when test="id='org.bedework.client.error.referenced.calendar'">
100         Cannot delete: the calendar is not empty.
101       </xsl:when>
102       <xsl:when test="id='org.bedework.client.error.referenced.category'">
103         Cannot delete: the category is referenced by events.
104       </xsl:when>
105       <xsl:when test="id='org.bedework.client.error.referenced.contact'">
106         Cannot delete: the contact is referenced by events.
107       </xsl:when>
108       <xsl:when test="id='org.bedework.client.error.referenced.location'">
109         Cannot delete: the location is referenced by events.
110       </xsl:when>
111       <xsl:when test="id='org.bedework.client.error.referenced.subscription'">
112         Cannot delete: the subscription is included in view <em><xsl:value-of select="param"/></em>.<br/>
113         You must remove the subscription from this view before deleting.
114       </xsl:when>
115       <xsl:when test="id='org.bedework.error.timezones.readerror'">
116         Timzone error: could not read file.
117       </xsl:when>
118
119       <!-- things we cannot find -->
120       <xsl:when test="id='org.bedework.client.error.unknown.attendee'">
121           Unknown attendee <em><xsl:value-of select="param"/></em>
122       </xsl:when>
123       <xsl:when test="id='org.bedework.client.error.unknown.calendar'">
124         Not found: there is no calendar with the path <em><xsl:value-of select="param"/></em>.
125       </xsl:when>
126       <xsl:when test="id='org.bedework.client.error.unknown.calendarsuite'">
127         There is no calendar suite with the name <em><xsl:value-of select="param"/></em>.
128       </xsl:when>
129       <xsl:when test="id='org.bedework.client.error.unknown.calendartype'">
130         System error: there is no calendar with the type <em><xsl:value-of select="param"/></em>.
131       </xsl:when>
132       <xsl:when test="id='org.bedework.client.error.unknown.category'">
133         Not found: there is no category with the keyword <em><xsl:value-of select="param"/></em>.
134       </xsl:when>
135       <xsl:when test="id='org.bedework.client.error.unknown.contact'">
136         Not found: there is no contact <em><xsl:value-of select="param"/></em>.
137       </xsl:when>
138       <xsl:when test="id='org.bedework.client.error.unknown.event'">
139           Event <xsl:value-of select="param"/> does not exist.
140       </xsl:when>
141       <xsl:when test="id='org.bedework.client.error.unknown.group'">
142         Error: unknown group:  <em><xsl:value-of select="param"/></em>.
143       </xsl:when>
144       <xsl:when test="id='org.bedework.client.error.unknown.location'">
145         Not found: there is no location identified by the id <em><xsl:value-of select="param"/></em>.
146       </xsl:when>
147       <xsl:when test="id='org.bedework.client.error.unknown.subscription'">
148         Not found: there is no user identified by the name <em><xsl:value-of select="param"/></em>.
149       </xsl:when>
150       <xsl:when test="id='org.bedework.client.error.unknown.user'">
151         Not found: the user <em><xsl:value-of select="param"/></em> was not found.
152       </xsl:when>
153       <xsl:when test="id='org.bedework.client.error.unknown.userid'">
154         Not found: there is no user identified by the id <em><xsl:value-of select="param"/></em>.
155       </xsl:when>
156       <xsl:when test="id='org.bedework.client.error.unknown.view'">
157         Not found: there is no view identified by the name <em><xsl:value-of select="param"/></em>.
158       </xsl:when>
159
160       <xsl:when test="id='org.bedework.client.error.viewnotadded'">
161         Error: the view was not added.
162       </xsl:when>
163
164       <!-- Validation errors mostly dealing with incorrect or missing field values
165            that are explicitly under user control -->
166
167       <xsl:when test="id='org.bedework.validation.error.expectoneattendee'">
168         You must supply exactly one attendee.
169       </xsl:when>
170       <xsl:when test="id='org.bedework.validation.error.invalid.how'">
171         Error: bad ACL request (bad how setting).
172       </xsl:when>
173       <xsl:when test="id='org.bedework.validation.error.invalid.whotype'">
174         Error: bad who type (user or group).
175       </xsl:when>
176       <xsl:when test="id='org.bedework.validation.error.invalid.attendee'">
177           The attendee uri is invalid
178       </xsl:when>
179       <xsl:when test="id='org.bedework.validation.error.invalid.date'">
180           Bad or out-of-range date.
181       </xsl:when>
182       <xsl:when test="id='org.bedework.validation.error.invalid.duration'">
183         <em>Invalid duration</em> - you may not have a zero-length duration
184         for an all day event.
185       </xsl:when>
186       <xsl:when test="id='org.bedework.validation.error.invalid.endtype'">
187         The endtype <em><xsl:value-of select="param"/></em> is invalid.
188       </xsl:when>
189       <xsl:when test="id='org.bedework.validation.error.invalid.organizer'">
190           The organizer uri is invalid
191       </xsl:when>
192       <xsl:when test="id='org.bedework.validation.error.invalid.prefendtype'">
193         The preferred endtype <em><xsl:value-of select="param"/></em> is invalid.
194       </xsl:when>
195       <xsl:when test="id='org.bedework.validation.error.invalid.prefusermode'">
196         The preferred user mode <em><xsl:value-of select="param"/></em> is invalid.
197       </xsl:when>
198       <xsl:when test="id='org.bedework.validation.error.invalid.prefworkdayend'">
199         Error: invalid working days end: <em><xsl:value-of select="param"/></em>
200       </xsl:when>
201       <xsl:when test="id='org.bedework.validation.error.invalid.prefworkdays'">
202         Error: invalid working days: start after end
203       </xsl:when>
204       <xsl:when test="id='org.bedework.validation.error.invalid.prefworkdaystart'">
205         Error: invalid working days start: <em><xsl:value-of select="param"/></em>
206       </xsl:when>
207       <xsl:when test="id='org.bedework.validation.error.invalid.recipient'">
208           The recipient uri is invalid
209       </xsl:when>
210       <xsl:when test="id='org.bedework.validation.error.invalid.recurcount'">
211         Error: bad value for recurrence count: <em><xsl:value-of select="param"/></em>
212       </xsl:when>
213       <xsl:when test="id='org.bedework.validation.error.invalid.recurcountanduntil'">
214         Error: Cannot specify count and until for recurrence
215       </xsl:when>
216       <xsl:when test="id='org.bedework.validation.error.invalid.recurinterval'">
217         Error: bad value for recurrence interval: <em><xsl:value-of select="param"/></em>
218       </xsl:when>
219       <xsl:when test="id='org.bedework.validation.error.invalid.recurrule'">
220         Error: bad recurrence rule: <em><xsl:value-of select="param"/></em>
221       </xsl:when>
222       <xsl:when test="id='org.bedework.validation.error.invalid.recuruntil'">
223         Error: bad value for recurrence until: <em><xsl:value-of select="param"/></em>
224       </xsl:when>
225       <xsl:when test="id='org.bedework.validation.error.cannot.change.method'">
226         Error: you cannot change scheduling method
227       </xsl:when>
228
229       <xsl:when test="id='org.bedework.validation.error.invalid.schedmethod'">
230         Error: bad value for recurrence until: <em><xsl:value-of select="param"/></em>
231       </xsl:when>
232       <xsl:when test="id='org.bedework.validation.error.invalid.schedmethod'">
233         Error: bad scheduling method (should be request or publish).
234       </xsl:when>
235       <xsl:when test="id='org.bedework.validation.error.invalid.schedpartstatus'">
236         Error: bad scheduling part status
237       </xsl:when>
238       <xsl:when test="id='org.bedework.validation.error.invalid.schedreplymethod'">
239         Error: bad scheduling method (should be reply).
240       </xsl:when>
241       <xsl:when test="id='org.bedework.validation.error.invalid.schedrequestmethod'">
242         Error: bad scheduling method (should be request).
243       </xsl:when>
244       <xsl:when test="id='org.bedework.validation.error.invalid.schedrespondmethod'">
245         Error: bad scheduling method (should be COUNTER, REFRESH, REPLY).
246       </xsl:when>
247
248       <xsl:when test="id='org.bedework.validation.error.invalid.status'">
249         Error: Invalid status: <em><xsl:value-of select="param"/></em>
250       </xsl:when>
251       <xsl:when test="id='org.bedework.validation.error.invalid.transparency'">
252         Error: Invalid transparency: <em><xsl:value-of select="param"/></em>
253       </xsl:when>
254       <xsl:when test="id='org.bedework.validation.error.invalid.user'">
255         Error: Invalid user: <em><xsl:value-of select="param"/></em>
256       </xsl:when>
257
258       <xsl:when test="id='org.bedework.validation.error.missinghow'">
259         Error: missing how.
260       </xsl:when>
261
262       <xsl:when test="id='org.bedework.validation.error.missingwho'">
263         Error: missing who (principal name).
264       </xsl:when>
265
266       <xsl:when test="id='org.bedework.validation.error.missingaddress'">
267         Your information is incomplete: please supply an address.
268       </xsl:when>
269
270       <xsl:when test="id='org.bedework.validation.error.missingcalendar'">
271         Your information is incomplete: please supply a calendar.
272       </xsl:when>
273
274       <xsl:when test="id='org.bedework.validation.error.missingcalendarpath'">
275         Your information is incomplete: please supply a calendar path.
276       </xsl:when>
277
278       <xsl:when test="id='org.bedework.validation.error.missingcalsuitecalendar'">
279         Your information is incomplete: please supply a root calendar path.
280       </xsl:when>
281
282       <xsl:when test="id='org.bedework.validation.error.missingcategorykeyword'">
283         Your information is incomplete: please supply a category keyword.
284       </xsl:when>
285
286       <xsl:when test="id='org.bedework.validation.error.missingcontact'">
287         Your information is incomplete: please supply a contact.
288       </xsl:when>
289
290       <xsl:when test="id='org.bedework.validation.error.missingcontactname'">
291         You must enter a contact <em>name</em>.
292       </xsl:when>
293
294       <xsl:when test="id='org.bedework.validation.error.missingdescription'">
295         Your information is incomplete: please supply a description.
296       </xsl:when>
297
298       <xsl:when test="id='org.bedework.validation.error.missingeventowner'">
299         Your information is incomplete: please supply an event owner.
300       </xsl:when>
301
302       <xsl:when test="id='org.bedework.validation.error.missinggroupname'">
303         Your information is incomplete: please supply a group name.
304       </xsl:when>
305
306       <xsl:when test="id='org.bedework.validation.error.missinggroupowner'">
307         Your information is incomplete: please supply a group owner.
308       </xsl:when>
309
310       <xsl:when test="id='org.bedework.validation.error.missinglocation'">
311         Your information is incomplete: please supply a location.
312       </xsl:when>
313
314       <xsl:when test="id='org.bedework.validation.error.missingname'">
315         Your information is incomplete: please supply a name.
316       </xsl:when>
317
318       <xsl:when test="id='org.bedework.validation.error.missingoriginator'">
319         You event is missing the originator
320       </xsl:when>
321
322       <xsl:when test="id='org.bedework.validation.error.missingrecipients'">
323         You must supply a recipient.
324       </xsl:when>
325
326       <xsl:when test="id='org.bedework.validation.error.missingsubscriptionid'">
327         Your information is incomplete: please supply a subscription id.
328       </xsl:when>
329
330       <xsl:when test="id='org.bedework.validation.error.missingtitle'">
331         Your information is incomplete: please supply a title.
332       </xsl:when>
333
334       <xsl:when test="id='org.bedework.validation.error.missingsuburi'">
335         Your information is incomplete: please supply a uri for the subscription.
336       </xsl:when>
337
338       <xsl:when test="id='org.bedework.validation.error.startafterend'">
339         The <em>end date</em> occurs before the <em>start date</em>.
340       </xsl:when>
341
342       <xsl:when test="id='org.bedework.validation.error.toolong.description'">
343         Your description is too long.  Please limit your entry to
344           characters.  You may also wish to
345           point the event entry at a supplemental web page by entering a <em>URL</em>.
346       </xsl:when>
347
348       <xsl:when test="id='org.bedework.validation.error.toolong.name'">
349         Your name is too long.  Please limit your entry to
350       </xsl:when>
351
352       <xsl:when test="id='org.bedework.validation.error.toolong.summary'">
353         Your summary is too long.  Please limit your entry to
354           characters.  You may also wish to
355           point the event entry at a supplemental web page by entering a <em>URL</em>.
356       </xsl:when>
357       <xsl:otherwise>
358         <xsl:value-of select="id"/> = <xsl:value-of select="param"/>
359       </xsl:otherwise>
360     </xsl:choose>
361   </xsl:template>
362 </xsl:stylesheet>
363
Note: See TracBrowser for help on using the browser.