forked from GithubBackups/healthchecks
Autofocus the email field in the signup form, and submit on enter key
This commit is contained in:
parent
163b020116
commit
4625196ded
@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file.
|
||||
- Add Go usage example
|
||||
- Send monthly reports on 1st of every month, not randomly during the month
|
||||
- Signup form sets the "auto-login" cookie to avoid an extra click during first login
|
||||
- Autofocus the email field in the signup form, and submit on enter key
|
||||
|
||||
### Bug Fixes
|
||||
- Prevent double-clicking the submit button in signup form
|
||||
|
@ -1,6 +1,6 @@
|
||||
$(function () {
|
||||
|
||||
$("#signup-go").on("click", function() {
|
||||
function submitForm() {
|
||||
var base = document.getElementById("base-url").getAttribute("href").slice(0, -1);
|
||||
var email = $("#signup-email").val();
|
||||
var token = $('input[name=csrfmiddlewaretoken]').val();
|
||||
@ -18,6 +18,18 @@ $(function () {
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#signup-go").on("click", submitForm);
|
||||
|
||||
$("#signup-email").keypress(function (e) {
|
||||
if (e.which == 13) {
|
||||
return submitForm();
|
||||
}
|
||||
});
|
||||
|
||||
$("#signup-modal").on('shown.bs.modal', function () {
|
||||
$("#signup-email").focus()
|
||||
})
|
||||
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user