Changeset 16206
- Timestamp:
- 14/07/08 13:57:03 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/intermine/webapp/main/resources/webapp/template.jsp
r16187 r16206 129 129 function forwardToLinks() 130 130 { 131 // needed validation that bag is not used, validation is performed in the Struts action as well 132 if (isBagUsed()) { 133 new Insertion.Bottom('error_msg','Link could not be created. This template contains list constraint(s). The service for this special template is not implemented yet. Solution: Don\'t use list contraint.<br/>'); 134 haserrors=1; 135 Effect.Appear('error_msg'); 136 return; 137 } 131 138 document.getElementById('actionType').value = 'links'; 132 139 document.templateForm.submit(); 140 } 141 142 function isBagUsed() { 143 // checks if bag is used, the presumption is that there aren't more than 10 bag constraints 144 for (var i = 0; i < 10; i++) { 145 if (document.templateForm["useBagConstraint("+i+")"]) { 146 if (document.templateForm["useBagConstraint("+i+")"].checked) { 147 return true; 148 } 149 } 150 } 151 return false; 133 152 } 134 153
