Changeset 851 for trunk/grails-app
- Timestamp:
- Mar 8, 2011, 6:33:40 PM (14 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/TaskService.groovy
r838 r851 388 388 return fail(field:"task", code:"task.failedToSave") 389 389 390 391 if(params.submitAction) { 392 def actionResult 393 def submit_andSetAttentionFlag = { 394 actionResult = setAttentionFlag(taskInstance) 395 if(actionResult.error) 396 return fail(field:"task", code:actionResult.error.code) 397 } 398 def submit_andComplete = { 399 actionResult = complete(taskInstance) 400 if(actionResult.error) 401 return fail(field:"task", code:actionResult.error.code) 402 } 403 404 switch (params.submitAction) { 405 case "submit_default": 406 break 407 case "submit_andSetAttentionFlag": 408 submit_andSetAttentionFlag() 409 break 410 case "submit_andComplete": 411 submit_andComplete() 412 break 413 default: 414 break 415 } // switch. 416 if(result.error) 417 return result 418 } // params.submitAction 419 390 420 // Success. 391 421 return result -
trunk/grails-app/views/entryDetailed/_create.gsp
r838 r851 13 13 <g:hiddenField name="task.id" value="${entryInstance.task.id}" /> 14 14 <g:hiddenField name="entryType.id" value="${entryInstance.entryType.id}" /> 15 <g:hiddenField name="submitAction" value="save" /> 15 16 <div class="dialog"> 16 17 <table> … … 105 106 </div> 106 107 <div class="buttons"> 107 <span class="button"><input class="save" type="submit" value="Create" /></span> 108 <span class="button"> 109 <input class="save" type="submit" value="Save" name="submit_default" /> 110 </span> 111 <span class="button"> 112 <input class="flag" type="button" value="Unresolved" name="submit_andSetAttentionFlag" /> 113 </span> 114 <custom:helpBalloon code="task.status.unresolved" iconSrc="${resource(plugin:'help-balloons', dir:'images', file:'balloon-icon.gif')}" /> 115 <span class="button"> 116 <g:if test="${entryInstance.task.attentionFlag}" > 117 <input class="complete" 118 type="button" 119 value="Resolved" 120 onclick="return confirm('${message(code:'task.clear.attention.flag.on.completion.confirm')}');" 121 name="submit_andComplete"/> 122 </g:if> 123 <g:else> 124 <input class="complete" type="button" value="Resolved" name="submit_andComplete" /> 125 </g:else> 126 </span> 127 <custom:helpBalloon code="task.status.resolved" iconSrc="${resource(plugin:'help-balloons', dir:'images', file:'balloon-icon.gif')}" /> 108 128 </div> 109 129 </g:form>
Note: See TracChangeset
for help on using the changeset viewer.