Changeset 105
- Timestamp:
- Jan 22, 2010, 12:37:14 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/studycapturing/WizardController.groovy
r103 r105 48 48 flow.page = 0 49 49 flow.pages = [ 50 [title: 'Study'], 50 [title: 'Study'], // study 51 51 [title: 'Twoooo'], 52 52 [title: 'Trois'] … … 55 55 } 56 56 57 // render the main wizard page 57 // render the main wizard page which immediately 58 // triggers the 'next' action (hence, the main 59 // page dynamically renders the study template 60 // and makes the flow jump to the study logic) 58 61 mainPage { 59 62 render(view: "/wizard/index") … … 64 67 } 65 68 69 // render the study page and handle study logic 66 70 study { 67 71 render(view: "_study") … … 72 76 on("next") { 73 77 // create a study instance 74 println params75 78 flow.study = new Study(params) 76 79 77 80 // validate study 78 81 if (flow.study.validate()) { 79 println "study validates"82 success() 80 83 } else { 81 84 // validation failed, feedback errors 82 85 flash.errors = new LinkedHashMap() 83 86 this.appendErrors(flow.study,flash.errors) 84 println "errorrrs"85 println flash.errors86 87 error() 87 88 } … … 154 155 } 155 156 } 156 157 157 } -
trunk/grails-app/views/wizard/common/_error.gsp
r103 r105 25 25 </div> 26 26 <script type="text/javascript"> 27 // show error dialog 27 28 $(function() { 28 29 $("div#wizardError").dialog({ -
trunk/grails-app/views/wizard/common/_wizard.gsp
r103 r105 21 21 <wizard:ajaxFlowRedirect form="form#wizardForm" name="next" url="[controller:'wizard',action:'pages']" update="[success:'wizardPage',failure:'wizardError']" afterSuccess="attachHelpTooltips()" /> 22 22 </div> 23 <!--g:render template="common/error"//-->24 23 </g:form> 25 24 </div> -
trunk/grails-app/views/wizard/pages/_study.gsp
r103 r105 16 16 %> 17 17 <wizard:pageContent> 18 <wizard:textFieldElement name="studyTitle" description="Title" >18 <wizard:textFieldElement name="studyTitle" description="Title" error="title" value="${study?.title}"> 19 19 The title of the study you are creating 20 20 </wizard:textFieldElement> 21 <wizard:textFieldElement name="studyCode" description="Code" >21 <wizard:textFieldElement name="studyCode" description="Code" error="code"> 22 22 A code to reference your study by 23 23 </wizard:textFieldElement> 24 <wizard:textFieldElement name="studyResearchQuestion" description="Research Question" >24 <wizard:textFieldElement name="studyResearchQuestion" description="Research Question" error="researchQuestion"> 25 25 The research question 26 26 </wizard:textFieldElement> 27 <wizard:textFieldElement name="studyDescription" description="Description" />28 <wizard:textFieldElement name="studyEcCode" description="Ethical Committee Code" />27 <wizard:textFieldElement name="studyDescription" description="Description" error="description" /> 28 <wizard:textFieldElement name="studyEcCode" description="Ethical Committee Code" error="ecCode" /> 29 29 </wizard:pageContent> -
trunk/web-app/js/wizard.js
r101 r105 14 14 */ 15 15 $(document).ready(function() { 16 re = /Firefox\/3\.6/gi; 17 if (navigator.userAgent.match(re)) { 18 // http://code.google.com/p/fbug/issues/detail?id=1899 19 var wizard = $('div#wizard') 20 wizard.html('<span style="color:red;font-size:8px;">You are using firefox 3.6, note that firefox 3.6 in combination with firebug (latest 1.6X.0a3) and XMLHttpRequest enabled in the console, break the workings of this wizard... Either disable console XMLHttpRequests, disable firebug altogether or downgrade to Firefox 3.5.7 instead</span>' + wizard.html()) 21 } 22 23 // attach Tooltips 16 24 attachHelpTooltips(); 17 25 }); 18 26 27 // attach help tooltips 19 28 function attachHelpTooltips() { 20 29 // attach help action on all wizard help icons
Note: See TracChangeset
for help on using the changeset viewer.