]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1304845 - The nda legal form is not working properly and does not allowed being...
authorDavid Lawrence <dkl@mozilla.com>
Thu, 22 Sep 2016 20:19:01 +0000 (20:19 +0000)
committerDavid Lawrence <dkl@mozilla.com>
Thu, 22 Sep 2016 20:19:01 +0000 (20:19 +0000)
extensions/BMO/template/en/default/bug/create/create-nda.html.tmpl
extensions/BMO/template/en/default/bug/create/custom_forms.none.tmpl

index a03a5ca0ff539cfef0aaf3bdaa9ca64cfa4383a1..2d766493ab9ef67929d462e75fa115c36129391d 100644 (file)
 [% inline_javascript = BLOCK %]
 $(function() {
   $('#nda_needed').on('change', function() {
-    if ($('#nda_needed').val() == 'Yes')
+    if ($('#nda_needed').val() == 'Yes') {
       $('#nda_needed_reason_row').show();
-      $('#nda_needed_reason').attr('disabled', false);
-    else
+    } else {
       $('#nda_needed_reason_row').hide();
-      $('#nda_needed_reason').attr('disabled', true);
+    }
+  });
+  $('#ndaForm').submit(function () {
+    if ($('#nda_needed').val() == 'Yes' && $('#nda_needed_reason').val() == '') {
+      alert('Please explain why confidential information needs to be shared at this stage.');
+      return false;
+    }
+    return true;
   });
 });
 [% END %]
@@ -93,7 +99,7 @@ $(function() {
         <strong>If yes, please explain.</strong>
       </label>
     </div>
-    <textarea required="true"  name="nda_needed_reason" id="nda_needed_reason" cols="80" rows="10"></textarea>
+    <textarea name="nda_needed_reason" id="nda_needed_reason" cols="80" rows="10"></textarea>
   </div>
 
   <div class="row">
index 9ec71766bdfac009f08eb7d95d25ca0179ba40a2..0b6ca717983b12ad414e4b65178b7a4aad854904 100644 (file)
@@ -223,7 +223,7 @@ custom_forms = {
       link  => 'form.moz.project.review'
     },
     {
-      title => 'Independant Contractor Request',
+      title => 'Independent Contractor Request',
       link  => 'form.moz.project.review'
     },
     {