Commit ec7d7e86 authored by Carsten  Rose's avatar Carsten Rose
Browse files

QfqForm.js: Added confirmation dialog on delete.

parent 96c33317
......@@ -82,9 +82,14 @@ if (!QfqNS) {
n.QfqForm.prototype.handleDeleteClick = function () {
this.lastButtonPress = "delete";
QfqNS.Log.debug("delete click");
$.post(this.deleteUrl)
.done(this.ajaxDeleteSuccessDispatcher.bind(this))
.fail(this.ajaxDeleteFailureHandler.bind(this));
var alert = new QfqNS.Alert("Do you really want to delete the record?", "warning", "yesno");
var that = this;
alert.addOkButtonHandler(function () {
$.post(that.deleteUrl)
.done(that.ajaxDeleteSuccessDispatcher.bind(that))
.fail(that.ajaxDeleteFailureHandler.bind(that));
});
alert.show();
};
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment