Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6 | Andrea | 1 | <#-- |
2 | /* |
||
3 | * $Id: fielderror.ftl 805635 2009-08-19 00:18:54Z musachy $ |
||
4 | * |
||
5 | * Licensed to the Apache Software Foundation (ASF) under one |
||
6 | * or more contributor license agreements. See the NOTICE file |
||
7 | * distributed with this work for additional information |
||
8 | * regarding copyright ownership. The ASF licenses this file |
||
9 | * to you under the Apache License, Version 2.0 (the |
||
10 | * "License"); you may not use this file except in compliance |
||
11 | * with the License. You may obtain a copy of the License at |
||
12 | * |
||
13 | * http://www.apache.org/licenses/LICENSE-2.0 |
||
14 | * |
||
15 | * Unless required by applicable law or agreed to in writing, |
||
16 | * software distributed under the License is distributed on an |
||
17 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||
18 | * KIND, either express or implied. See the License for the |
||
19 | * specific language governing permissions and limitations |
||
20 | * under the License. |
||
21 | */ |
||
22 | --> |
||
23 | <#if fieldErrors??><#t/> |
||
24 | <#assign eKeys = fieldErrors.keySet()><#t/> |
||
25 | <#assign eKeysSize = eKeys.size()><#t/> |
||
26 | <#assign doneStartUlTag=false><#t/> |
||
27 | <#assign doneEndUlTag=false><#t/> |
||
28 | <#assign haveMatchedErrorField=false><#t/> |
||
29 | <#if (fieldErrorFieldNames?size > 0) ><#t/> |
||
30 | <#list fieldErrorFieldNames as fieldErrorFieldName><#t/> |
||
31 | <#list eKeys as eKey><#t/> |
||
32 | <#if (eKey = fieldErrorFieldName)><#t/> |
||
33 | <#assign haveMatchedErrorField=true><#t/> |
||
34 | <#assign eValue = fieldErrors[fieldErrorFieldName]><#t/> |
||
35 | <#if (haveMatchedErrorField && (!doneStartUlTag))><#t/> |
||
36 | |||
37 | |||
38 | |||
39 | <ul<#rt/> |
||
40 | <#if parameters.id?if_exists != ""> |
||
41 | id="${parameters.id?html}"<#rt/> |
||
42 | </#if> |
||
43 | <#if parameters.cssClass??> |
||
44 | class="${parameters.cssClass?html}"<#rt/> |
||
45 | <#else> |
||
46 | class="errorMessage"<#rt/> |
||
47 | </#if> |
||
48 | <#if parameters.cssStyle??> |
||
49 | style="${parameters.cssStyle?html}"<#rt/> |
||
50 | </#if> |
||
51 | > |
||
52 | <#assign doneStartUlTag=true><#t/> |
||
53 | </#if><#t/> |
||
54 | <#list eValue as eEachValue><#t/> |
||
55 | <li><span>${eEachValue}</span></li> |
||
56 | </#list><#t/> |
||
57 | </#if><#t/> |
||
58 | </#list><#t/> |
||
59 | </#list><#t/> |
||
60 | <#if (haveMatchedErrorField && (!doneEndUlTag))><#t/> |
||
61 | </ul> |
||
62 | |||
63 | |||
64 | |||
65 | <#assign doneEndUlTag=true><#t/> |
||
66 | </#if><#t/> |
||
67 | <#else><#t/> |
||
68 | <#if (eKeysSize > 0)><#t/> |
||
69 | <div style="border:2px solid red;"> |
||
70 | <img src="images/errore.png" width="30px" height="30px"/> <strong style="font-size:15px;">ERRORE</strong> |
||
71 | |||
72 | <ul<#rt/> |
||
73 | <#if parameters.cssClass??> |
||
74 | class="${parameters.cssClass?html}"<#rt/> |
||
75 | <#else> |
||
76 | class="errorMessage"<#rt/> |
||
77 | </#if> |
||
78 | <#if parameters.cssStyle??> |
||
79 | style="${parameters.cssStyle?html}"<#rt/> |
||
80 | </#if> |
||
81 | > |
||
82 | <#list eKeys as eKey><#t/> |
||
83 | <#assign eValue = fieldErrors[eKey]><#t/> |
||
84 | <#list eValue as eEachValue><#t/> |
||
85 | <li><span><#if parameters.escape??>${eEachValue!?html}<#else>${eEachValue!}</#if></span></li> |
||
86 | </#list><#t/> |
||
87 | </#list><#t/> |
||
88 | </ul> |
||
89 | |||
90 | </div> |
||
91 | |||
92 | |||
93 | </#if><#t/> |
||
94 | </#if><#t/> |
||
95 | </#if><#t/> |