mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
error if sign up form is empty
This commit is contained in:
parent
f6fb8372b9
commit
e1246e0d13
2 changed files with 6 additions and 0 deletions
|
@ -4,6 +4,10 @@ Template.user_signup.events = {
|
|||
var username = $('#username').val();
|
||||
var email = $('#email').val();
|
||||
var password = $('#password').val();
|
||||
if(!username || !email || !password){
|
||||
throwError('Please fill in all fields');
|
||||
return false;
|
||||
}
|
||||
Accounts.createUser({
|
||||
username: username
|
||||
, email: email
|
||||
|
|
|
@ -17,6 +17,8 @@ var updateScore = function (collection, id) {
|
|||
if(object.sticky)
|
||||
newScore=999;
|
||||
collection.update(id, {$set: {score: newScore}});
|
||||
|
||||
// console.log('old score: '+object.baseScore+' | new score: '+newScore+' | score diff: '+Math.abs(newScore-object.baseScore));
|
||||
};
|
||||
|
||||
Meteor.startup(function () {
|
||||
|
|
Loading…
Add table
Reference in a new issue