boonebgorges/invite-anyone — pull request #117 by dcavins (2014-09-09 17:06:12+00:00)
Title: Submit button state management

Prevents form submission (using return key, mostly) if no invites are listed.

This is sort of a follow-up to the ajax spinner you just added, and sort of addresses similar problems. Some of my users are typing in a search string and hitting "enter" before the autocomplete response. Of course, nothing happens.

I thought it would make sense to disable the "submit" button if no invites are in the list. I also disabled the submit button while the user is interacting with the autocomplete search box to prevent reflexive "enter" key behavior from becoming accidental submits.

Let me know what you think.