Skip to content
Snippets Groups Projects
Commit 5a4aa09f authored by juanf's avatar juanf
Browse files

SSDM-1935 : ELN: Warning on deleting samples - More pronounced

SVN: 34020
parent ef6b2d58
No related branches found
No related tags found
No related merge requests found
...@@ -319,7 +319,12 @@ var FormUtil = new function() { ...@@ -319,7 +319,12 @@ var FormUtil = new function() {
var $fieldset = $('<div>'); var $fieldset = $('<div>');
var $controlGroup = $('<div>', {class : 'form-group'}); 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 }); var $controls = $('<div>', {class : 'controls ' + this.controlColumnClass });
$controlGroup.append($controlLabel); $controlGroup.append($controlLabel);
......
...@@ -69,9 +69,9 @@ function SampleFormView(sampleFormController, sampleFormModel) { ...@@ -69,9 +69,9 @@ function SampleFormView(sampleFormController, sampleFormModel) {
//Delete //Delete
var warningText = null; var warningText = null;
if(this._sampleFormModel.sample.children.length > 0 || this._sampleFormModel.datasets.length > 0) { if(this._sampleFormModel.sample.children.length > 0 || this._sampleFormModel.datasets.length > 0) {
warningText = '' warningText = ""
if(this._sampleFormModel.sample.children.length > 0) { 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; var numChildrenToShow = this._sampleFormModel.sample.children.length;
if(numChildrenToShow > 10) { if(numChildrenToShow > 10) {
numChildrenToShow = 10; numChildrenToShow = 10;
...@@ -84,7 +84,7 @@ function SampleFormView(sampleFormController, sampleFormModel) { ...@@ -84,7 +84,7 @@ function SampleFormView(sampleFormController, sampleFormModel) {
} }
} }
if(this._sampleFormModel.datasets.length > 0) { 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; var numDatasetsToShow = this._sampleFormModel.datasets.length;
if(numDatasetsToShow > 10) { if(numDatasetsToShow > 10) {
numDatasetsToShow = 10; numDatasetsToShow = 10;
......
...@@ -28,7 +28,9 @@ function DeleteEntityView(deleteEntityController, deleteEntityModel) { ...@@ -28,7 +28,9 @@ function DeleteEntityView(deleteEntityController, deleteEntityModel) {
$window.append($('<legend>').append('Confirm Delete')); $window.append($('<legend>').append('Confirm Delete'));
if(this._deleteEntityModel.warningText) { 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) { if(this._deleteEntityModel.includeReason) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment