diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js index def7673948a3db8617c136596393faa3400b08c2..6d85747ac8cdd9ac4e2be47ffc6b09f4656af70a 100644 --- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js +++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js @@ -319,7 +319,12 @@ var FormUtil = new function() { var $fieldset = $('<div>'); var $controlGroup = $('<div>', {class : 'form-group'}); - var $controlLabel = $('<label>', {class : 'control-label ' + this.labelColumnClass}).text(label + ":"); + + var $controlLabel = $('<label>', {class : 'control-label ' + this.labelColumnClass}); + if(label) { + $controlLabel.text(label + ":"); + } + var $controls = $('<div>', {class : 'controls ' + this.controlColumnClass }); $controlGroup.append($controlLabel); diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js index bde8e78bdaf781b495db0e4e1baa7fbf1146b8fb..963ae4dc116f06d81cdb0500115c70977fb4ce7b 100644 --- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js +++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js @@ -69,9 +69,9 @@ function SampleFormView(sampleFormController, sampleFormModel) { //Delete var warningText = null; if(this._sampleFormModel.sample.children.length > 0 || this._sampleFormModel.datasets.length > 0) { - warningText = '' + warningText = "" if(this._sampleFormModel.sample.children.length > 0) { - warningText += "\n- The sample has " + this._sampleFormModel.sample.children.length + " children samples, these relationships will be broken but the children will remain:"; + warningText += "The sample has " + this._sampleFormModel.sample.children.length + " children samples, these relationships will be broken but the children will remain:"; var numChildrenToShow = this._sampleFormModel.sample.children.length; if(numChildrenToShow > 10) { numChildrenToShow = 10; @@ -84,7 +84,7 @@ function SampleFormView(sampleFormController, sampleFormModel) { } } if(this._sampleFormModel.datasets.length > 0) { - warningText += "\n- The sample has " + this._sampleFormModel.datasets.length + " datasets, these will be deleted with the sample:"; + warningText += "\nThe sample has " + this._sampleFormModel.datasets.length + " datasets, these will be deleted with the sample:"; var numDatasetsToShow = this._sampleFormModel.datasets.length; if(numDatasetsToShow > 10) { numDatasetsToShow = 10; diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/DeleteEntityView.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/DeleteEntityView.js index c5a25ab08fe82dd6040c618f344a0a6d89fffd95..31a89066db69b84db2663592becd02d7a18f4226 100644 --- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/DeleteEntityView.js +++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/DeleteEntityView.js @@ -28,7 +28,9 @@ function DeleteEntityView(deleteEntityController, deleteEntityModel) { $window.append($('<legend>').append('Confirm Delete')); if(this._deleteEntityModel.warningText) { - $window.append(FormUtil.getFieldForLabelWithText("Warning", this._deleteEntityModel.warningText)); + var $warning = FormUtil.getFieldForLabelWithText(null, this._deleteEntityModel.warningText); + $warning.css('color', '#e71616'); + $window.append($warning); } if(this._deleteEntityModel.includeReason) {