Don't disable the Add button below the HR.
authorCMDR furrycat <elite@furrycat.net>
Tue, 26 Jan 2016 11:14:14 +0000 (06:14 -0500)
committerCMDR furrycat <elite@furrycat.net>
Tue, 26 Jan 2016 11:14:14 +0000 (06:14 -0500)
entry.js

index 568c40a..a2a1026 100644 (file)
--- a/entry.js
+++ b/entry.js
@@ -618,8 +618,11 @@ function validate(table, cloned) {
     }
   }
 
-  var submits = document.getElementsByName('add_entry');
-  if (submits.length) submits[0].disabled = ! valid;
+  /* Disable actual submit button, not the initial prep button. */
+  for (var submit of document.getElementsByName('add_entry')) {
+    if (submit.value.match(/^\d+$/)) continue;
+    submit.disabled = ! valid;
+  }
 }
 
 /* A cell was changed. */