Last change
on this file since 1916 was
1916,
checked in by t.w.abma@…, 10 years ago
|
- updated gdtImporter to 0.4.5.7
|
-
Property svn:keywords set to
Rev Author Date
|
File size:
1.6 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: 1916 $ |
---|
13 | * $Author: t.w.abma@umcutrecht.nl $ |
---|
14 | * $Date: 2011-06-07 14:53:06 +0000 (di, 07 jun 2011) $ |
---|
15 | */ |
---|
16 | %> |
---|
17 | |
---|
18 | <g:if test="${wizardErrors}"> |
---|
19 | <div id="wizardError" class="error" title="errors"> |
---|
20 | <g:each in="${wizardErrors}" var="error" status="e"> |
---|
21 | <p> |
---|
22 | <g:if test="${!e}"><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 50px 0;"></span></g:if> |
---|
23 | ${error.value['key']} → ${error.value['value']} |
---|
24 | </p> |
---|
25 | </g:each> |
---|
26 | </div> |
---|
27 | <script type="text/javascript"> |
---|
28 | // mark error fields |
---|
29 | <g:each in="${wizardErrors}" var="error"> |
---|
30 | var element = $("input:[name='${error.key}'], input:[name='${error.key.toLowerCase().replaceAll("([^a-z0-9])","_")}'], select:[name='${error.key}'], select:[name='${error.key.toLowerCase().replaceAll("([^a-z0-9])","_")}'], textarea:[name='${error.key}'], textarea:[name='${error.key.toLowerCase().replaceAll("([^a-z0-9])","_")}']"); |
---|
31 | <g:if test="${error.value['dynamic']}"> |
---|
32 | element.addClass('error'); |
---|
33 | </g:if><g:else> |
---|
34 | element.parent().parent().removeClass('required'); |
---|
35 | element.parent().parent().addClass('error'); |
---|
36 | </g:else> |
---|
37 | </g:each> |
---|
38 | |
---|
39 | // show error dialog |
---|
40 | var we = $("div#wizardError"); |
---|
41 | we.dialog({ |
---|
42 | modal: true, |
---|
43 | width: 600, |
---|
44 | maxHeight: 400, |
---|
45 | open: function(event, ui) { |
---|
46 | $(this).css({'max-height': 400, 'overflow-y': 'auto'}); |
---|
47 | }, |
---|
48 | buttons: { |
---|
49 | Ok: function() { |
---|
50 | $(this).dialog('close'); |
---|
51 | we.remove(); |
---|
52 | } |
---|
53 | } |
---|
54 | }); |
---|
55 | </script> |
---|
56 | </g:if> |
---|
Note: See
TracBrowser
for help on using the repository browser.