Changeset 802
- Timestamp:
- Feb 10, 2011, 12:17:55 PM (14 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/i18n/messages.properties
r738 r802 144 144 task.delete.failure.production=Tasks may not be deleted in production mode, \ 145 145 set the trash flag instead. 146 task.trash.confirm=Trash, are you sure? \ 147 If authorised, recurrence will be disabled and Sub Task links will be forever removed! 146 148 task.notFound=Could not complete operation, task not found. 147 149 task.operationNotPermittedOnCompleteTask=This operation is not permitted on a complete task. 148 150 task.operationNotPermittedOnTaskInTrash=This operation is not permitted on a task that is in the trash. 149 task.operationNotPermittedOnRecurringTaskWithoutAuth=This operation is not permitted on a recurring task without authorisation. 151 task.operationNotPermittedOnRecurringTaskWithoutAuth=This operation is not permitted \ 152 on a recurring task without authorisation. 153 task.operationNotPermittedOnTaskHavingSubTasksWithoutAuth=This operation is not permitted \ 154 on a task that has sub tasks without authorisation. 155 task.operationNotPermittedOnTaskLinkedToProcedure=This operation is not permitted \ 156 on a task that is linked to a procedure. 157 task.operationNotPermittedOnParentPmTask=This operation is not permitted \ 158 on a Parent PM task. 150 159 task.failedToSave=Could not complete operation, task failed to save. 151 160 task.modifications.failedToSave=Could not complete operation, as task modification record failed to save. -
trunk/grails-app/services/TaskService.groovy
r749 r802 685 685 } 686 686 687 // Check for authorisation on tasks having subTasks. 688 if(result.taskInstance.subTasks) { 689 if(!authenticateService.ifAnyGranted('ROLE_AppAdmin,ROLE_Manager,ROLE_TaskManager')) 690 return fail(field:"subTasks", code:"task.operationNotPermittedOnTaskHavingSubTasksWithoutAuth") 691 } 692 693 // Check for taskProcedure using this task as linkedTask. 694 if(result.taskInstance.taskProcedure?.linkedTask?.id == result.taskInstance.id) 695 return fail(field:"taskProcedure", code:"task.operationNotPermittedOnTaskLinkedToProcedure") 696 697 // Check for Parent PM task type. 698 if(result.taskInstance.taskType.id == 6) 699 return fail(field:"taskProcedure", code:"task.operationNotPermittedOnParentPmTask") 700 687 701 result.taskInstance.trash = true 688 702 result.taskInstance.attentionFlag = false 689 703 result.taskInstance.taskRecurringSchedule?.enabled = false 704 result.taskInstance.subTasks.each { 705 it.parentTask = null 706 } 690 707 691 708 if(result.taskInstance.hasErrors() || !result.taskInstance.save()) -
trunk/grails-app/views/taskDetailed/show.gsp
r799 r802 282 282 283 283 <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> 284 <span class="button"><g:actionSubmit class="trash" onclick="return confirm('Are you sure?');" value="Trash" /></span> 284 <span class="button"> 285 <g:actionSubmit class="trash" 286 onclick="return confirm('${message(code:'task.trash.confirm')}');" 287 value="Trash" /> 288 </span> 285 289 286 290 </g:if>
Note: See TracChangeset
for help on using the changeset viewer.