community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1663763 - /comdev/reporter.apache.org/site/addrelease.html
Date Tue, 03 Mar 2015 18:45:46 GMT
Author: humbedooh
Date: Tue Mar  3 18:45:46 2015
New Revision: 1663763

URL: http://svn.apache.org/r1663763
Log:
check for valid date

Modified:
    comdev/reporter.apache.org/site/addrelease.html

Modified: comdev/reporter.apache.org/site/addrelease.html
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/site/addrelease.html?rev=1663763&r1=1663762&r2=1663763&view=diff
==============================================================================
--- comdev/reporter.apache.org/site/addrelease.html (original)
+++ comdev/reporter.apache.org/site/addrelease.html Tue Mar  3 18:45:46 2015
@@ -15,7 +15,7 @@
 <div id="contents" class="row-12" style="text-align: center; margin: 0 auto; width: 1000px;
">
   <h2>Apache Project Report Helper: Add a release</h2>
   <p>Please fill out the fields below to add a release to our report database. This
is not a requirement, but a help to those that use the Apache Reporter System to gauge the
project's development.</p>
-   <form action="addrelease.py" method="post" id="form" onsubmit="validate(this)">
+   <form action="addrelease.py" method="post" id="form" onsubmit="return validate(this)">
     
     <input type="hidden" name="date" value="" id="date"/>
     <b>Project:</b></b><input type="text" name="project" value="" readonly="readonly"
id="project"/><br/>
@@ -39,7 +39,13 @@
      function validate(form) {
       var x = document.getElementById('xdate').value.split("-");
       var y = new Date(x[0],parseInt(x[1])-1,parseInt(x[2]));
-      document.getElementById('date').value = parseInt(y.getTime()/1000);
+      var nn = parseInt(y.getTime()/1000);
+      document.getElementById('date').value = nn;
+      if (isNaN(nn)) {
+        alert("Please fill out the release date using YYYY-MMM-DD!")
+        return false
+      }
+      return true
      }
     </script>
 </body>



Mime
View raw message