diff --git a/frontend-js/src/main/js/GuiConnector.js b/frontend-js/src/main/js/GuiConnector.js
index c3b40206069b7aa812bba3f7df4999fd97bbcd54..d80ef002facdde63cba7fb4ddcf0a5b13670c7f1 100644
--- a/frontend-js/src/main/js/GuiConnector.js
+++ b/frontend-js/src/main/js/GuiConnector.js
@@ -247,6 +247,35 @@ GuiConnector.prototype.info = function (message) {
 
 };
 
+GuiConnector.prototype.showConfirmationDialog = function (params) {
+  var message = params.message;
+  var title = params.title;
+  if (title === undefined) {
+    title = "Confirm";
+  }
+  return new Promise(function (resolve) {
+    $('<div></div>').appendTo('body')
+      .html('<div><h6>' + message + '</h6></div>')
+      .dialog({
+        modal: true, title: title, zIndex: 10000, autoOpen: true,
+        width: 'auto', resizable: false,
+        buttons: {
+          Yes: function () {
+            $(this).dialog("close");
+            resolve(true);
+          },
+          No: function () {
+            $(this).dialog("close");
+            resolve(false);
+          }
+        },
+        close: function (event, ui) {
+          $(this).remove();
+        }
+      });
+  });
+};
+
 GuiConnector.prototype.destroy = function () {
   var self = returnThisOrSingleton(this);
 
diff --git a/frontend-js/src/test/js/GuiConnector-test.js b/frontend-js/src/test/js/GuiConnector-test.js
index 3975a518f47a06918ebf3481f9fc92275698afb9..1a97eb1f9c6eeed7adc862805603426dcf6a0a29 100644
--- a/frontend-js/src/test/js/GuiConnector-test.js
+++ b/frontend-js/src/test/js/GuiConnector-test.js
@@ -42,14 +42,14 @@ describe('GuiConnector', function () {
       var connector = new (GuiConnector.constructor)();
       ServerConnector.getSessionData().setLogin("testUser");
       var message = connector.getErrorMessageForError(new SecurityError());
-      assert.ok(message.indexOf("ask your administrator")>=0);
+      assert.ok(message.indexOf("ask your administrator") >= 0);
       connector.destroy();
     });
     it('SecurityError when not logged in', function () {
       var connector = new (GuiConnector.constructor)();
       ServerConnector.getSessionData().setLogin("anonymous");
       var message = connector.getErrorMessageForError(new SecurityError());
-      assert.ok(message.indexOf("to access this resource")>=0);
+      assert.ok(message.indexOf("to access this resource") >= 0);
       connector.destroy();
     });
   });
@@ -91,4 +91,30 @@ describe('GuiConnector', function () {
     });
   });
 
+  describe('showConfirmationDialog', function () {
+    it('when answer is Yes', function () {
+      var connector = new (GuiConnector.constructor)();
+      // click Yes button in coming ms
+      setTimeout(function () {
+        $("button:contains(Yes)").click()
+      }, 50);
+
+      return connector.showConfirmationDialog({message: "hi there", title: "some"}).then(function (result) {
+        assert.ok(result);
+      });
+    });
+    it('when answer is No', function () {
+      var connector = new (GuiConnector.constructor)();
+      // click Yes button in coming ms
+      setTimeout(function () {
+        $("button:contains(No)").click()
+      }, 50);
+
+      return connector.showConfirmationDialog({message: "hi there", title: "some"}).then(function (result) {
+        assert.notOk(result);
+      });
+    });
+  });
+
+
 });
\ No newline at end of file