Commit 08bc06e3 by Matthew Mongeau

Fixed form for signup

parent af5de27a
......@@ -16,18 +16,18 @@
<label>Public Username</label>
<input name="username" type="text" placeholder="Public Username">
<label>Full Name</label>
<input name="full-name" type="text" placeholder="Full Name">
<input name="name" type="text" placeholder="Full Name">
<label>Your Location</label>
<input name="location" type="text" placeholder="Your Location">
<label>Prefered Language</label>
<input name="language" type="text" placeholder="Prefered Language">
<label class="terms-of-service">
<input name="terms" type="checkbox">
<input name="terms_of_service" type="checkbox" value="true">
I agree to the
<a href="#">Terms of Service</a>
</label>
<label class="honor-code">
<input name="honor-code" type="checkbox">
<input name="honor_code" type="checkbox" value="true">
I agree to the
<a href="#">Honor Code</a>
, sumarized below as:
......@@ -76,6 +76,7 @@
function getCookie(name) {
return $.cookie(name);
}
function postJSON(url, data, callback) {
$.ajax({type:'POST',
url: url,
......@@ -88,13 +89,7 @@
$('form#enroll_form').submit(function(e) {
e.preventDefault();
var submit_data={};
$.each($("[id^=ca_]"), function(index,value){
submit_data[value.name]=value.value;
});
$.each($("[id^=cb_]"), function(index,value){
submit_data[value.name]=value.checked;
});
var submit_data = $('#enroll_form').serialize();
postJSON('/create_account',
submit_data,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment