diff --git a/src/index.coffee b/src/index.coffee index 9461f00..cc0c2ff 100644 --- a/src/index.coffee +++ b/src/index.coffee @@ -3,18 +3,13 @@ window.$ = require('jquery') # on load $ -> - # libs requiring full DOM - io = require 'socket.io-client' - # style sheet require './style/custom.scss' - # # init Socket.IO - # socket = io() - # reset forms $('form').each -> that = @ + @fullReset = -> $('input', that).each -> $(that).removeClass 'is-invalid' @@ -22,7 +17,7 @@ $ -> that.reset() # login form - $('form[name="login"]').submit -> + $('form[name="login"]').submit (event) -> # inhibit normal form submission event.preventDefault() @@ -40,7 +35,7 @@ $ -> # reset form @fullReset() - # register form + # registration form $('form[name="register"]').submit (event) -> # inhibit normal form submission event.preventDefault() diff --git a/views/index.pug b/views/index.pug index 9c15eeb..854bec9 100644 --- a/views/index.pug +++ b/views/index.pug @@ -31,7 +31,7 @@ html input.form-control(name="password" type="password" required) div.form-group - button.btn.btn-primary(type="submit") Login + button.btn.btn-primary.w-100.text-center(type="submit") Login div.col-md-3 h3 Register @@ -47,4 +47,4 @@ html label(for="confirm") Confirm password: input.form-control(name="confirm" type="password") - button.btn.btn-primary(type="submit") Register + button.btn.btn-primary.w-100.text-center(type="submit") Register