mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
initial commit
This commit is contained in:
parent
b7c7d8b449
commit
750811a81f
52 changed files with 25204 additions and 92 deletions
33
client/Accounts/TeacherLogin/teacherLogin.js
Normal file
33
client/Accounts/TeacherLogin/teacherLogin.js
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
Template.teacherLogin.onCreated(function() {
|
||||
|
||||
});
|
||||
|
||||
Template.teacherLogin.onRendered(function() {
|
||||
|
||||
});
|
||||
|
||||
Template.teacherLogin.helpers({
|
||||
areFilled: function() {
|
||||
return Session.get("filledFields");
|
||||
},
|
||||
});
|
||||
|
||||
Template.teacherLogin.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 #teacherReg' (event) {
|
||||
event.preventDefault();
|
||||
FlowRouter.go('/teachReg');
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue