Last change
on this file since 250 was
250,
checked in by duh, 13 years ago
|
- date and datetimefields are now handled independent of naming but by field type (a rel='date' and rel='datetime' argument is added to the rendered input element)
- client side error reporting did not work properly for select elements
- dynamically inserted javascript confirmation warning in the DOM-anchors outside of the wizard (navigating away from the wizard without saving causes loss of data and work)
|
-
Property svn:keywords set to
Author Rev Date
|
File size:
1.2 KB
|
Line | |
---|
1 | <% |
---|
2 | /** |
---|
3 | * Wizard error template |
---|
4 | * |
---|
5 | * @author Jeroen Wesbeek |
---|
6 | * @since 20100114 |
---|
7 | * @package wizard |
---|
8 | * @see dbnp.studycapturing.WizardTagLib |
---|
9 | * @see dbnp.studycapturing.WizardController |
---|
10 | * |
---|
11 | * Revision information: |
---|
12 | * $Rev: 250 $ |
---|
13 | * $Author: duh $ |
---|
14 | * $Date: 2010-03-09 13:16:07 +0000 (di, 09 mrt 2010) $ |
---|
15 | */ |
---|
16 | %> |
---|
17 | <g:if test="${errors}"> |
---|
18 | <div id="wizardError" class="error" title="errors"> |
---|
19 | <g:each in="${errors}" var="error" status="e"> |
---|
20 | <p> |
---|
21 | <g:if test="${!e}"><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 50px 0;"></span></g:if> |
---|
22 | ${error.value['key']} → ${error.value['value']} |
---|
23 | ${error.value['dynamic']} |
---|
24 | </p> |
---|
25 | </g:each> |
---|
26 | </div> |
---|
27 | <script type="text/javascript"> |
---|
28 | // mark error fields |
---|
29 | <g:each in="${errors}" var="error"> |
---|
30 | <g:if test="${error.value['dynamic']}"> |
---|
31 | $("input:[name='${error.key}'], select:[name='${error.key}']").addClass('error'); |
---|
32 | </g:if><g:else> |
---|
33 | $("input:[name='${error.key}'], select:[name='${error.key}']").parent().parent().addClass('error'); |
---|
34 | </g:else> |
---|
35 | </g:each> |
---|
36 | |
---|
37 | // show error dialog |
---|
38 | $(function() { |
---|
39 | $("div#wizardError").dialog({ |
---|
40 | modal: true, |
---|
41 | width: 600, |
---|
42 | buttons: { |
---|
43 | Ok: function() { |
---|
44 | $(this).dialog('close'); |
---|
45 | } |
---|
46 | } |
---|
47 | }); |
---|
48 | }); |
---|
49 | </script> |
---|
50 | </g:if> |
---|
Note: See
TracBrowser
for help on using the repository browser.