Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.

Commit

Permalink
Fixing a problem where if the user hits enter in the form field.
Browse files Browse the repository at this point in the history
* the first button in the form would be clicked instead of the "submit" event, even if the first button is hidden.
* Changed the order of the DOM so that the correct button comes first in the DOM.
  • Loading branch information
Shane Tomlinson committed Jan 4, 2012
1 parent 9f885dd commit 7aa5495
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions resources/views/signup.ejs
Expand Up @@ -27,16 +27,6 @@
</p>
</li>

<li class="notification" id="primary_verify">
<p>
To verify that you own <strong id="primary_email">address</strong>, you must
sign in with your provider. A new window will be opened.
</p>

<p>
<button id="authWithPrimary">Verify</button>
</p>
</li>
</ul>

<ul class="inputs forminputs">
Expand Down Expand Up @@ -64,6 +54,22 @@
</div>
<button>Verify Email</button>
</div>

<ul class="notifications">
<!-- This has to go down here because of the button. Firefox clicks the first button in the form whenever the user hits enter in the form, whether the button is shown or not, and even if there is an input[type=submit]. Ghetto. -->
<li class="notification" id="primary_verify">
<p>
To verify that you own <strong id="primary_email">address</strong>, you must
sign in with your provider. A new window will be opened.
</p>

<p>
<button id="authWithPrimary">Verify</button>
</p>
</li>
</ul>


</form>

<div class="notification" id="congrats">
Expand Down

0 comments on commit 7aa5495

Please sign in to comment.