MDL-35119 tool_assignmentupgrade Changing onsubmit form for onclick button
authorDavid Monllao <davidm@moodle.com>
Wed, 29 Aug 2012 07:01:40 +0000 (15:01 +0800)
committerAparup Banerjee <aparup@moodle.com>
Wed, 29 Aug 2012 08:18:45 +0000 (16:18 +0800)
admin/tool/assignmentupgrade/module.js

index 6370e70..7c170f1 100644 (file)
@@ -42,8 +42,8 @@ M.tool_assignmentupgrade = {
             }
         });
 
-        var batchform = Y.one('.tool_assignmentupgrade_batchform form');
-        batchform.on('submit', function(e) {
+        var upgradeselectedbutton = Y.one('#id_upgradeselected');
+        upgradeselectedbutton.on('click', function(e) {
             checkboxes = Y.all('td.c0 input');
             var selectedassignments = [];
             checkboxes.each(function(node) {