mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
My big initial commit to this repo and project.
This commit is contained in:
parent
750811a81f
commit
8636f8cf9b
2433 changed files with 199488 additions and 1042 deletions
33
client/Accounts/Login/login.js
Normal file
33
client/Accounts/Login/login.js
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
Template.login.onCreated(function() {
|
||||
|
||||
});
|
||||
|
||||
Template.login.onRendered(function() {
|
||||
|
||||
});
|
||||
|
||||
Template.login.helpers({
|
||||
areFilled: function() {
|
||||
return Session.get("filledFields");
|
||||
}
|
||||
});
|
||||
|
||||
Template.login.events({
|
||||
'click #logmein' (event) {
|
||||
event.preventDefault();
|
||||
console.log("clicked login");
|
||||
let email = $("#email").val();
|
||||
let pass = $("#password").val();
|
||||
|
||||
if (email == null || email == "" || pass == "" || pass == null) {
|
||||
Session.set("filledFields", false);
|
||||
return;
|
||||
} else {
|
||||
Meteor.loginWithPassword(email, pass);
|
||||
}
|
||||
},
|
||||
'click #reg' (event) {
|
||||
event.preventDefault();
|
||||
FlowRouter.go('/reg');
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue