From 66100895bb9f26c21a3cbbfc05cc7a1ab910f79c Mon Sep 17 00:00:00 2001
From: Kálmán Viktor <kviktor@cloud.bme.hu>
Date: Wed, 12 Nov 2014 15:28:49 +0100
Subject: [PATCH] dashboard: fix operation form getting submitted twice

---
 circle/dashboard/static/dashboard/vm-list.js           | 2 +-
 circle/dashboard/templates/dashboard/mass-operate.html | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/circle/dashboard/static/dashboard/vm-list.js b/circle/dashboard/static/dashboard/vm-list.js
index a671c71..f4a73a4 100644
--- a/circle/dashboard/static/dashboard/vm-list.js
+++ b/circle/dashboard/static/dashboard/vm-list.js
@@ -101,7 +101,7 @@ $(function() {
   });
 
 
-  $("body").on("click", "#op-form-send", function() {
+  $("body").on("click", "#mass-op-form-send", function() {
     var url = $(this).closest("form").prop("action");
     $(this).find("i").prop("class", "fa fa-fw fa-spinner fa-spin");
 
diff --git a/circle/dashboard/templates/dashboard/mass-operate.html b/circle/dashboard/templates/dashboard/mass-operate.html
index 33d6e83..0c9baa7 100644
--- a/circle/dashboard/templates/dashboard/mass-operate.html
+++ b/circle/dashboard/templates/dashboard/mass-operate.html
@@ -31,7 +31,7 @@ Do you want to perform the <strong>{{op}}</strong> operation on the following {{
   <div class="pull-right">
     <a class="btn btn-default" href="{% url "dashboard.views.vm-list" %}"
      data-dismiss="modal">{% trans "Cancel" %}</a>
-    <button class="btn btn-{{ opview.effect }}" type="submit" id="op-form-send">
+    <button class="btn btn-{{ opview.effect }}" type="submit" id="mass-op-form-send">
       {% if opview.icon %}<i class="fa fa-fw fa-{{opview.icon}}"></i> {% endif %}{{ opview.name|capfirst }}
     </button>
   </div>
--
libgit2 0.26.0