Commits

barrysahu  committed 33041aa

Fixed issues with submitting

  • Participants
  • Parent commits a2bfaf8

Comments (0)

Files changed (4)

File views/resources/D001/scripts/.app.js.swp

Binary file modified.

File views/resources/D001/scripts/app.js

         mode:'ui'
     };
 
+    $("#hackday-form").submit(function(evt) {
+        evt.preventDefault();
+        var config = $.extend({}, app.config);
+        var hackday = new native5.core.Service('save', app.config);
+        hackday.configureHandlers(function(data) {
+            alert('Your project is submitted.');
+        }, function(err) {
+            alert('We are facing some issues');
+        });
+        var project = {
+            teamName : $("form #teamName").val(),
+            teamMembers : $("form #teamMembers").val(),
+            twitterHandle : $("form #twitterHandle").val(),
+            projectName : $("form #projectName").val(),
+            projectDesc : $("form #projectDesc").val(),
+
+        };
+        service.invoke(project);
+    });
     return app;
 })(app || {}, native5);
 

File views/templates/D001/.login.html.swp

Binary file modified.

File views/templates/D001/login.html

         <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
         <![endif]-->
     </head>
-    <body>
-        <form role="form">
+    <body style="margin:20px;">
+        <form role="form" id="hackday-form">
             <div class="form-group">
                 <label for="teamName">Team Name</label>
                 <input type="text" class="form-control" id="teamName" placeholder="Team Name">
             </div>
             <div class="form-group">
                 <label for="projectDesc"></label>
-                <textarea class="form-control" id="projectDesc" rows=3></textarea> 
+                <textarea class="form-control" id="projectDesc" rows=3 placeholder="Description"></textarea> 
             </div>
             <button type="submit" class="btn btn-default">Submit</button>
         </form>