151 lines
5.1 KiB
HTML
151 lines
5.1 KiB
HTML
<%inherit file="main.html" />
|
|
<script>
|
|
$(function() {
|
|
/* Set up FancyBox pop-ups */
|
|
$("a#inline").fancybox({
|
|
'hideOnContentClick': false
|
|
});
|
|
|
|
// TODO: Clean up as per http://stackoverflow.com/questions/169506/obtain-form-input-fields-using-jquery
|
|
|
|
/* Handles when the user hits 'enroll'. Grabs form data. Does AJAX.
|
|
Either shows error, or shows success. */
|
|
$('#create_account_button').click(function() {
|
|
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;
|
|
});
|
|
|
|
postJSON('/create_account',
|
|
submit_data,
|
|
function(json) {
|
|
if(json.success) {
|
|
$('#enroll').html(json.value);
|
|
} else {
|
|
$('#enroll_error').html(json.value);
|
|
}
|
|
}
|
|
);
|
|
});
|
|
|
|
/* Handles when the user tries to log in. Grabs form data. Does AJAX.
|
|
Either shows error, or redirects. */
|
|
$('#login_button').click(function() {
|
|
var submit_data={};
|
|
$.each($("[id^=li_]"), function(index,value){
|
|
submit_data[value.name]=value.value;
|
|
});
|
|
|
|
postJSON('/login',
|
|
submit_data,
|
|
function(json) {
|
|
if(json.success) {
|
|
location.href="/courseware";
|
|
} else {
|
|
$('#login_error').html("Invalid Login");
|
|
}
|
|
}
|
|
);
|
|
});
|
|
|
|
$('#pwd_reset_button').click(function() {
|
|
$.post('/password_reset/',{ "csrfmiddlewaretoken" : "${ csrf }",
|
|
"email" : $('#id_email').val()}, function(data){
|
|
$('#pwd_reset').html(data);
|
|
});
|
|
});
|
|
|
|
/* Activate stupid spinner drop-downs in enrollment form */
|
|
var spinner_array=$("[id^=spinner_]");
|
|
spinner_array.each(function(i) {
|
|
var s=spinner_array[i];
|
|
$("#"+s.id).click(function(){
|
|
$("#sregion"+s.id.substring(7)).toggle();
|
|
});
|
|
})
|
|
|
|
|
|
/*$("sregion"+$("[id^=spinner_]")[1].id.substring(7)) */
|
|
});
|
|
|
|
</script>
|
|
|
|
<div id="topWrapper">
|
|
<div id="topBanner"></div>
|
|
</div>
|
|
|
|
<div id="topnav">
|
|
<ul>
|
|
<li id="current" style="border:none">
|
|
<a href="#" shape="rect">Home</a>
|
|
</li>
|
|
<li style="border:none">
|
|
<a href="/t/info.html" shape="rect">Course Info</a>
|
|
</li>
|
|
<li style="border:none">
|
|
<a href="/t/staff.html" shape="rect">Instructors</a>
|
|
</li>
|
|
<li style="border:none">
|
|
<a href="/t/credits.html" shape="rect">Credits</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<!-- end top wrapper -->
|
|
<div id="wrapper">
|
|
<div id="bg">
|
|
<div id="header"></div>
|
|
<div id="page">
|
|
<!-- begin container -->
|
|
<div id="container">
|
|
<!-- content -->
|
|
<div id="content">
|
|
|
|
<center>
|
|
<table>
|
|
<tr><td align=right><big><a id="inline" href="#enroll">Enroll >></a><br><br><br>
|
|
<a id="inline" href="#login">Log In >></a></big></td><td><div style="width:50px; float:center;"></div></td><td>
|
|
<div style="width:300px; float:center;">
|
|
Taught by Anant Agarwal, with Gerald Sussman, Piotr Mitros, and Chris
|
|
Terman, "6.002 Circuits and Electronics" is an an on-line adaption of
|
|
MIT's first undergraduate analog design course. This course will run,
|
|
free of charge, for students worldwide from February 1, 2012 through
|
|
July 1, 2012.
|
|
|
|
<br><br>Students who successfully complete the course will receive an
|
|
electronic certificate of accomplishment from MIT. Students will not
|
|
receive course credit, but students successfully finishing the course
|
|
will be well-placed to take an exam to pass out of 6.002 should they
|
|
ever enroll at MIT, and potentially, similar courses at other schools.
|
|
|
|
<br><br> In order to succeed in this course, students must have some
|
|
background in calculus and differential equations. Since more advanced
|
|
mathematics will not show up until the second half of the course, the
|
|
first half of the course will include an optional remedial
|
|
differential equations component for students with weaker math
|
|
backgrounds.
|
|
|
|
</div>
|
|
|
|
<div style="display:none"><div id="enroll" name="enroll"><%include file="create_account.html" /></div></div>
|
|
<div style="display:none"><div id="login"><%include file="login.html" /></div></div>
|
|
<div style="display:none"><div id="pwd_reset"><%include file="password_reset_form.html" /></div></div>
|
|
<div style="display:none"><div id="reset_done"></div></div>
|
|
|
|
|
|
</td></tr></table>
|
|
|
|
|
|
|
|
</div>
|
|
<!-- end content -->
|
|
</div>
|
|
<!-- end container -->
|
|
</div>
|
|
<div id="footerWrapper"></div>
|
|
</div>
|
|
</div>
|