frontend: Make signup/login/passwordreset/forgot forms submittable
Fixes #117
This commit is contained in:
@@ -4,7 +4,9 @@
|
||||
(document);
|
||||
|
||||
// Talks to the API and sends an reset email.
|
||||
global.sendResetHex = function() {
|
||||
global.sendResetHex = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
var allOk = global.unfilledMark(["#email"], function(el) {
|
||||
el.css("border-bottom", "1px solid red");
|
||||
});
|
||||
|
@@ -43,7 +43,9 @@
|
||||
|
||||
|
||||
// Logs the user in and redirects to the dashboard.
|
||||
global.login = function() {
|
||||
global.login = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
var allOk = global.unfilledMark(["#email", "#password"], function(el) {
|
||||
el.css("border-bottom", "1px solid red");
|
||||
});
|
||||
|
@@ -1,7 +1,9 @@
|
||||
(function (global, document) {
|
||||
"use strict";
|
||||
|
||||
global.resetPassword = function() {
|
||||
global.resetPassword = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
var allOk = global.unfilledMark(["#password", "#password2"], function(el) {
|
||||
el.css("border-bottom", "1px solid red");
|
||||
});
|
||||
|
@@ -4,7 +4,9 @@
|
||||
// Signs up the user and redirects to either the login page or the email
|
||||
// confirmation, depending on whether or not SMTP is configured in the
|
||||
// backend.
|
||||
global.signup = function() {
|
||||
global.signup = function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if ($("#password").val() !== $("#password2").val()) {
|
||||
global.textSet("#err", "The two passwords don't match");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user