Jelajahi Sumber

fixed registering

Akira Laine 9 tahun lalu
induk
melakukan
0cda4776e0

+ 4 - 3
app/client/scripts/events.js

@@ -533,10 +533,11 @@ Template.queues.events({
 Template.register.events({
     "submit form": function(e){
         e.preventDefault();
-        var username = e.target.registerUsername.value;
-        var email = e.target.registerEmail.value;
-        var password = e.target.registerPassword.value;
+        var username = $("#username").val()
+        var email = $("#email").val()
+        var password = $("#password").val();
         var captchaData = grecaptcha.getResponse();
+        console.log(captchaData)
         Meteor.call("createUserMethod", {username: username, email: email, password: password}, captchaData, function(err, res) {
             grecaptcha.reset();
 

+ 4 - 0
app/client/stylesheets/app.css

@@ -58,3 +58,7 @@ main {
 .card-content p i{
     float: left;
 }
+
+.register{
+    margin: 10px 0 0 0px;
+}

+ 1 - 1
app/client/templates/header.html

@@ -23,7 +23,7 @@
         </ul>
         <nav>
             <div class="nav-wrapper teal accent-4">
-                <a href="/" class="brand-logo">Musare</a>
+                <a href="/" class="brand-logo light">Musare</a>
                 <a href="#" data-activates="mobile-navi" class="button-collapse"><i class="material-icons">menu</i></a>
                 <ul class="right hide-on-med-and-down scroll-fix">
                     <li><a href="/news">News</a></li>

+ 3 - 3
app/client/templates/project.html

@@ -20,10 +20,10 @@
             There are essentially 3 main ways in which you can help us:
         <ol>
             <li>
-                If you are a JavaScript developer, then we can use your help! Out project is open source and all the
+                If you are a JavaScript developer, then we can use your help! Our project is open source and all the
                 source code can be found on GitHub. We would love for you to create new features, add exciting
                 content or just improve what already is on Musare. Also, if you see a bug or glitch on Musare, then
-                create anew
+                create a new
                 "issue" on GitHub and we will fix it as soon as possible. You can also have a try at fixing a
                 bug that you may find!
             </li>
@@ -32,7 +32,7 @@
                 amount of donation is highly appreciated, and will help us maintain server costs.
             </li>
             <li>
-                Send us feedback! You're comments and/or suggestion are extermely valuable to us. In order to improve
+                Send us feedback! You're comments and/or suggestion are extremely valuable to us. In order to improve
                 we need to know what you like, don't like or what you might want on the app.
             </li>
         </ol>

+ 24 - 23
app/client/templates/register.html

@@ -1,30 +1,31 @@
 <template name="register">
-        {{> header}}
-        <main>
-          <div class="container row">
+    {{> header}}
+    <main>
+        <div class="container row">
             <h1>Register</h1>
             <form class="col s12">
-              <div class="row">
-                <div class="input-field col s6">
-                  <input id="username" type="text" class="validate">
-                  <label for="first_name">Username</label>
+                <div class="row">
+                    <div class="input-field col s6">
+                        <input id="username" type="text" class="validate">
+                        <label for="username">Username</label>
+                    </div>
+                    <div class="input-field col s6">
+                        <input id="email" type="email" class="validate">
+                        <label for="email">Email</label>
+                    </div>
                 </div>
-                <div class="input-field col s6">
-                  <input id="email" type="email" class="validate">
-                  <label for="last_name">Email</label>
+                <div class="row">
+                    <div class="input-field col s12">
+                        <input id="password" type="password" class="validate">
+                        <label for="password">Password</label>
+                    </div>
                 </div>
-              </div>
-              <div class="row">
-                <div class="input-field col s12">
-                  <input id="password" type="password" class="validate">
-                  <label for="password">Password</label>
-                </div>
-              </div>
+                {{> reCAPTCHA}}
+                <button class="btn waves-effect waves-light register" type="submit" name="action">Submit
+                    <i class="material-icons right">send</i>
+                </button>
             </form>
-            <button class="btn waves-effect waves-light" type="submit" name="action" style="margin-left: 10px;">Submit
-              <i class="material-icons right">send</i>
-            </button>
-          </div>
-        </main>
-        {{> footer}}
+        </div>
+    </main>
+    {{> footer}}
 </template>