diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormController.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormController.js index 3f22bd10aab124d8933abe3e3c3878052ef8e079..46e2fe6b6cccf50ae63978572aaf3a4af1caaed3 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormController.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormController.js @@ -104,7 +104,7 @@ function SampleFormController(mainController, mode, sample) { }); } - this.createUpdateCopySample = function(isCopyWithNewCode, linkParentsOnCopy, copyChildrenOnCopy) { + this.createUpdateCopySample = function(isCopyWithNewCode, linkParentsOnCopy, copyChildrenOnCopy, copyCommentsLogOnCopy) { Util.blockUI(); var _this = this; @@ -232,6 +232,11 @@ function SampleFormController(mainController, mode, sample) { parameters["sampleCode"] = isCopyWithNewCode; parameters["notCopyProperties"] = []; parameters["defaultBenchPropertyList"] = []; + + if(!copyCommentsLogOnCopy && parameters["sampleProperties"]["XMLCOMMENTS"]) { + delete parameters["sampleProperties"]["XMLCOMMENTS"]; + } + if(!linkParentsOnCopy) { parameters["sampleParents"] = []; } diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js index 9526758203cda1aa7c4fbfea05dbbd9beb178eb7..ba5d68cfa4405e106c003798279e1ee69b303792 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js @@ -623,6 +623,8 @@ function SampleFormView(sampleFormController, sampleFormModel) { component += "<span class='checkbox'><label><input type='checkbox' id='linkParentsOnCopy'> Link Parents </label></span>"; component += " "; component += "<span class='checkbox'><label><input type='checkbox' id='copyChildrenOnCopy'> Copy Children </label></span>"; + component += " "; + component += "<span class='checkbox'><label><input type='checkbox' id='copyCommentsLogOnCopy'> Copy Comments Log </label></span>"; component += "</div>"; component += "</div>"; component += "</div>"; @@ -658,10 +660,11 @@ function SampleFormView(sampleFormController, sampleFormModel) { var newSampleCodeForCopy = $("#newSampleCodeForCopy"); var linkParentsOnCopy = $("#linkParentsOnCopy")[0].checked; var copyChildrenOnCopy = $("#copyChildrenOnCopy")[0].checked; + var copyCommentsLogOnCopy = $("#copyCommentsLogOnCopy")[0].checked; var isValid = newSampleCodeForCopy[0].checkValidity(); if(isValid) { var newSampleCodeForCopyValue = newSampleCodeForCopy.val(); - _this._sampleFormController.createUpdateCopySample(newSampleCodeForCopyValue, linkParentsOnCopy, copyChildrenOnCopy); + _this._sampleFormController.createUpdateCopySample(newSampleCodeForCopyValue, linkParentsOnCopy, copyChildrenOnCopy, copyCommentsLogOnCopy); } else { Util.showError("Invalid code.", function() {}, true); }