Commit c5ad93cc authored by bbaer's avatar bbaer

workaround fix. not sure why it can't call the function

parent b221dfc3
......@@ -111,7 +111,7 @@ var QfqNS = QfqNS || {};
this.fileUploader = new n.FileUpload('#' + this.formId, this.fileUploadTo);
this.fileUploader.on('fileupload.started', this.startUploadHandler);
this.fileUploader.on('fileupload.upload.successful', this.fileUploadSuccessHandler);
this.fileUploader.on('fileupload.upload.successful', that.fileUploadSuccessHandler);
this.fileUploader.on('fileupload.upload.failed',
function (obj) {
......@@ -378,7 +378,7 @@ var QfqNS = QfqNS || {};
this.bsTabs = bsTabs;
};
n.QfqForm.prototype.createError = function(message) {
n.QfqForm.prototype._createError = function (message) {
var messageButtons = [{
label: "Ok",
eventName: 'close'
......@@ -396,7 +396,7 @@ var QfqNS = QfqNS || {};
}
if (obj.data.status === "error") {
this.createError(obj.data.message);
this._createError(obj.data.message);
return;
}
......@@ -428,8 +428,14 @@ var QfqNS = QfqNS || {};
}
if (obj.data.status === "error") {
this.createError(obj.data.message);
return;
//this._createError(obj.data.message);
var messageButtons = [{
label: "Ok",
eventName: 'close'
}];
var alert = new n.Alert({ "message": obj.data.message, "type": obj.data.status, modal: true, buttons: messageButtons});
alert.show();
return false;
}
var $fileInput = $(obj.target);
......@@ -494,7 +500,7 @@ var QfqNS = QfqNS || {};
}
if (data.status === "error") {
this.createError("Error while updating form:<br>" +
this._createError("Error while updating form:<br>" +
(data.message ? data.message : "No reason given"));
return;
}
......@@ -727,7 +733,7 @@ var QfqNS = QfqNS || {};
}
if (data.redirect === "no") {
this.createError("redirect=='no' not allowed");
this._createError("redirect=='no' not allowed");
return;
}
......@@ -750,7 +756,7 @@ var QfqNS = QfqNS || {};
if (!data.message) {
throw Error("Status is 'error' but required 'message' attribute is missing.");
}
this.createError(data.message);
this._createError(data.message);
this.setButtonEnabled(this.getDeleteButton(), false);
};
......@@ -885,7 +891,7 @@ var QfqNS = QfqNS || {};
if (!data.message) {
throw Error("Status is 'error' but required 'message' attribute is missing.");
}
this.createError(data.message);
this._createError(data.message);
if (data["field-name"] && this.bsTabs) {
var tabId = this.bsTabs.getContainingTabIdForFormControl(data["field-name"]);
......@@ -907,7 +913,7 @@ var QfqNS = QfqNS || {};
this.setButtonEnabled(this.getDeleteButton(), false);
this.formImmutableDueToConcurrentAccess = true;
this.lockAcquired = false;
this.createError(data.message);
this._createError(data.message);
};
n.QfqForm.prototype.handleOverrideableConflict = function (form, data) {
......
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