From: CMDR furrycat Date: Tue, 26 Jan 2016 11:14:14 +0000 (-0500) Subject: Don't disable the Add button below the HR. X-Git-Url: http://git.furryclan.net/?a=commitdiff_plain;h=6e2185ec96983231fe882dbfd8e47f41eaaed8b0;p=furrycat%2Frace-o-matic.git Don't disable the Add button below the HR. --- diff --git a/entry.js b/entry.js index 568c40a..a2a1026 100644 --- 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. */