I have this code create.js:
Template.register.events({
'submit form': function(event) {
event.preventDefault();
var emailVar = event.target.registerEmail.value;
var passwordVar = event.target.registerPassword.value;
Accounts.createUser({
email: emailVar,
password: passwordVar
});
}
});
This create.html
<template name="register">
<form>
<div class="mdl-card mdl-shadow--6dp" style="opacity: 0.9; filter: alpha(opacity=90); /* For IE8 and earlier */" >
<div class="mdl-card__title mdl-color--third mdl-color-text--black" style="align-items: center;
justify-content: center; ">
logo
</div>
<div class="mdl-card__supporting-text">
<div class="mdl-textfield mdl-js-textfield">
<input class="mdl-textfield__input" type="email" id="registerEmail" name="registerEmail" />
<label class="mdl-textfield__label" for="registerEmail">Email</label>
</div>
<div class="mdl-textfield mdl-js-textfield">
<input class="mdl-textfield__input" type="password" id="registerPassword" name="registerPassword" />
<label class="mdl-textfield__label" for="registerPassword">Password</label>
</div>
</div>
<div class="mdl-card__actions mdl-card--border" style="text-align: center;">
<button style="margin-left:115px;" type='submit' value="Register" class="mdl-button mdl-button--raised ">Register</button>
</div>
</div>
</form>
</template>
And all these packages:
meteor-base@1.0.4 # Packages every Meteor app needs to have
mobile-experience@1.0.4 # Packages for a great mobile UX
mongo@1.1.14 # The database Meteor supports right now
blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views
reactive-var@1.0.11 # Reactive variable for tracker
jquery@1.11.10 # Helpful client-side library
tracker@1.1.1 # Meteor's client-side reactive programming library
standard-minifier-css@1.3.2 # CSS minifier run for production mode
standard-minifier-js@1.2.1 # JS minifier run for production mode
es5-shim@4.6.15 # ECMAScript 5 compatibility for older browsers.
ecmascript@0.6.1 # Enable ECMAScript2015+ syntax in app code
# kadira:flow-router # routs for pages
# kadira:blaze-layout # blaze layout templates with flowrouter
autopublish@1.0.7 # Publish all data to the clients (for prototyping)
insecure@1.0.7 # Allow all DB writes from clients (for prototyping)
accounts-ui@1.1.9
accounts-password@1.3.3
msavin:mongol
accounts-google@1.0.11
accounts-twitter@1.1.12
accounts-ui-unstyled@1.1.13
zodiase:mdl
rajasegar:multilevelmenu
reactive-dict@1.1.8
gwendall:body-events
# thesabbir:jquery-nestable show sidenav with nested childs
# utilities:menu show sidenav with nested childs
http@1.2.10
# useraccounts:mdl # er fjernet pga den gjorde man ikke kune oprette en bruger
meteortoys:allthings
ryanswapp:datetime-picker
momentjs:moment
brentjanderson:buzz
iron:router
npm-bcrypt@0.9.2
daishi:blaze-showhide
useraccounts:iron-routing
when i submit the form nothing are insertet to the mongodb, is it a package problem?