From 01e6f9ca408171c90b1df56600be7d0ae28d12b9 Mon Sep 17 00:00:00 2001
From: juanf <juanf>
Date: Mon, 2 Jun 2014 11:32:06 +0000
Subject: [PATCH] SSDM-216: ELN UI - GENERAL - Cloning samples in ELN

SVN: 31625
---
 .../1/as/webapps/newbrowser/html/js/views/SampleForm.js       | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm.js
index 6c0539bb9b8..8c1607ccc58 100644
--- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm.js
+++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm.js
@@ -305,7 +305,7 @@ function SampleForm(serverFacade, inspector, containerId, profile, sampleTypeCod
 		var localReference = this;
 		$( "#copyButton" ).click(function() {
 			var component = "<div class='form-horizontal'>"
-				component += "Input a new code for the duplicate, the duplicate will not have parents or children: <br><br>";
+				component += "<span class='glyphicon glyphicon-warning-sign'></span> Input a new code for the duplicate, the duplicate will not have parents or children: <br><br>";
 				component += "<div class='form-group col-md-9'>";
 				component += "<label class='control-label  " + localReference.labelColumnClass+ "'>Code&nbsp;(*):</label>";
 				component += "<div class='" + localReference.controlColumnClass + "'>";
@@ -334,6 +334,8 @@ function SampleForm(serverFacade, inspector, containerId, profile, sampleTypeCod
 					var newSampleCodeForCopyValue = newSampleCodeForCopy.val();
 					localReference.createSample(newSampleCodeForCopyValue);
 					Util.unblockUI();
+				} else {
+					Util.showError("Invalid code.", function() {}, true);
 				}
 			});
 			
-- 
GitLab