aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/projecttopbar.js6
-rw-r--r--bitbake/lib/toaster/toastergui/templates/projecttopbar.html3
2 files changed, 8 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js b/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js
index b09f974e477..6f29f5fbba0 100644
--- a/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js
+++ b/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js
@@ -87,4 +87,10 @@ function projectTopBarInit(ctx) {
window.location.replace(libtoaster.ctx.projectBuildsUrl);
}, null);
});
+
+ /* Call makeProjectNameValidation function */
+ libtoaster.makeProjectNameValidation($("#project-name-change-input"),
+ $("#hint-error-project-name"), $("#validate-project-name"),
+ $("#project-name-change-btn"));
+
}
diff --git a/bitbake/lib/toaster/toastergui/templates/projecttopbar.html b/bitbake/lib/toaster/toastergui/templates/projecttopbar.html
index 007de06ffb7..6742340f470 100644
--- a/bitbake/lib/toaster/toastergui/templates/projecttopbar.html
+++ b/bitbake/lib/toaster/toastergui/templates/projecttopbar.html
@@ -33,11 +33,12 @@
{% endif %}
</h1>
<form id="project-name-change-form" style="margin-bottom: 0px; display: none;">
- <div class="input-append">
+ <div class="input-append" id="validate-project-name">
<input class="huge input-xxlarge" type="text" id="project-name-change-input" autocomplete="off" value="{{project.name}}">
<button id="project-name-change-btn" class="btn btn-large" type="button">Save</button>
<a href="#" id="project-name-change-cancel" class="btn btn-large btn-link">Cancel</a>
</div>
+ <span class="help-block error" style="display: none;" id="hint-error-project-name">A project with this name exists. Project names must be unique.</span>
</form>
</div>