Commit 9b88a8b0 authored by bbaer's avatar bbaer
Browse files

only save form if form changed = true

parent ae02d384
......@@ -315,7 +315,7 @@ var QfqNS = QfqNS || {};
return;
}
if (event.which === 13 && this.submitOnEnter()) {
if (this.form.formChanged) {
if (this.isFormChanged()) {
this.lastButtonPress = "save&close";
n.Log.debug("save&close click");
this.submit();
......@@ -531,8 +531,13 @@ var QfqNS = QfqNS || {};
n.QfqForm.prototype.callSave = function(uri) {
console.log("target: " + uri);
this.handleSaveClick();
this.goToAfterSave = uri;
if(this.isFormChanged()) {
this.handleSaveClick();
this.goToAfterSave = uri;
} else {
window.location = uri;
return;
}
};
/**
......
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