summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js b/bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js
index 328997af3b..98e87f4a6b 100644
--- a/bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js
+++ b/bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js
@@ -9,6 +9,8 @@ function newCustomImageModalInit(){
9 var nameInput = imgCustomModal.find('input'); 9 var nameInput = imgCustomModal.find('input');
10 10
11 var invalidMsg = "Image names cannot contain spaces or capital letters. The only allowed special character is dash (-)."; 11 var invalidMsg = "Image names cannot contain spaces or capital letters. The only allowed special character is dash (-).";
12 var duplicateImageMsg = "An image with this name already exists in this project.";
13 var duplicateRecipeMsg = "A non-image recipe with this name already exists.";
12 14
13 newCustomImgBtn.click(function(e){ 15 newCustomImgBtn.click(function(e){
14 e.preventDefault(); 16 e.preventDefault();
@@ -22,8 +24,10 @@ function newCustomImageModalInit(){
22 console.warn(ret.error); 24 console.warn(ret.error);
23 if (ret.error === "invalid-name") { 25 if (ret.error === "invalid-name") {
24 showError(invalidMsg); 26 showError(invalidMsg);
25 } else if (ret.error === "already-exists") { 27 } else if (ret.error === "image-already-exists") {
26 showError("An image with this name already exists. Image names must be unique."); 28 showError(duplicateImageMsg);
29 } else if (ret.error === "recipe-already-exists") {
30 showError(duplicateRecipeMsg);
27 } 31 }
28 } else { 32 } else {
29 imgCustomModal.modal('hide'); 33 imgCustomModal.modal('hide');