Commit 5833484f authored by bbaer's avatar bbaer
Browse files

Changing buttons for the dirty Events depending on status

parent 372bbe9a
......@@ -172,23 +172,31 @@ var QfqNS = QfqNS || {};
n.QfqForm.prototype.dirtyRenewalDenied = function (obj) {
var that = this;
var messageButtons = [{
label: "Reload",
eventName: 'reload'
}];
if (obj.data.status == "conflict_allow_force") {
messageButtons.push({
label: "Ignore",
eventName: 'ignore'
});
}
var alert = new n.Alert(
{
type: "error",
message: obj.data.message,
modal: true,
buttons: [
{
label: "Reload",
eventName: 'reload'
}
]
buttons: messageButtons
}
);
alert.on('alert.reload', function () {
that.eventEmitter.emitEvent('qfqform.close-intentional', n.EventEmitter.makePayload(that, null));
window.location.reload(true);
});
alert.on('alert.ignore', function() {
console.log("Ignored Recordlock");
});
alert.show();
};
......
Supports Markdown
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