]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: ui handles duplicate project name in new project page
authorSujith H <sujith.h@gmail.com>
Mon, 9 May 2016 23:01:49 +0000 (00:01 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 11 May 2016 10:32:14 +0000 (11:32 +0100)
When already existing project name is typed by user,
the ui pops up message regarding the existance of the
project name.

[YOCTO #7005]

Signed-off-by: Sujith H <sujith.h@gmail.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/toaster/toastergui/templates/newproject.html

index e83b2bea61d5511785d22fb3073c37bfad22d008..8913057f40578306b7aef0c39b4592e50159a33a 100644 (file)
         <div class="span6">
         <form method="POST">{% csrf_token %}
 
-            <fieldset>
+            <fieldset id="validate-project-name">
               <label>Project name <span class="muted">(required)</span></label>
-              <input type="text" class="input-xlarge" required id="new-project-name" name="projectname">
+              <div>
+                <input type="text" class="input-xlarge" required id="new-project-name" name="projectname">
+                <p class="help-block error" style="display: none;" id="hint-error-project-name">A project with this name exists. Project names must be unique.</p>
+              </div>
             </fieldset>
 <!--
             <fieldset>
                 $('#description-' + new_release).fadeIn();
             });
 
+            libtoaster.makeProjectNameValidation($("#new-project-name"),
+                 $("#hint-error-project-name"), $("#validate-project-name"),
+                 $(".btn-primary"));
+
+
 /*                     // Hide the project release when you select an analysis project
                        function projectType() {
                                if ($("input[type='radio']:checked").val() == 'build') {