Commit 30042ceb by Kyle Fiedler

merge

parents ec548fda 02ca97a3
......@@ -2,7 +2,7 @@
<div name="enroll_form" id="enroll_form">
<h1>Enroll in 6.002 Circuits &amp; Electronics</h1>
<form name="login" method="get">
<form name="enroll" id="enroll_form" method="get">
<fieldset><% if 'error' in locals(): e = error %>
<div id="enroll_error" name="enroll_error"></div>
......@@ -67,6 +67,6 @@
</li>
</ol>
<input name="create_account_button" id="create_account_button" type="button" value="Create Account">
<input name="create_account_button" id="create_account_button" type="submit" value="Create Account">
</fieldset> </form>
</div>
......@@ -38,7 +38,12 @@
<p>In order to succeed in this course, you must have taken an AP level physics course in electricity and magnetism. You must know basic calculus and linear algebra and have some background in 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 those who need it.</p>
<p>The course web site was developed and tested primarily with Google Chrome. We support Mozilla Firefox as well. While we will attempt to make it possible to complete the course with Internet Explorer, portions of the web site functionality will be unavailable. The videos require Flash.</p>
<p>The course web site was developed and tested primarily with
Google Chrome. We support current versions of Mozilla Firefox as
well. The video player is designed to work with Flash. While we
provide a non-Flash fallback for the video, as well as partial
support for Internet Explorer, other browsers, and tablets,
portions of the functionality will be unavailable. </p>
</section>
<section class="cta">
......@@ -80,7 +85,8 @@ $(function() {
/* Handles when the user hits 'enroll'. Grabs form data. Does AJAX.
Either shows error, or shows success. */
$('#create_account_button').click(function() {
$('form#enroll_form').submit(function(e) {
e.preventDefault();
var submit_data={};
$.each($("[id^=ca_]"), function(index,value){
submit_data[value.name]=value.value;
......
......@@ -3,7 +3,7 @@ ${ error }
<div id="login_div">
<h1>Log in to MITx</h1>
<form name="login" action="/login" method="get">
<form id="login_form" method="post">
<div id="login_error"></div>
<ol>
<li>
......@@ -21,7 +21,7 @@ ${ error }
</li>
</ol>
<input name="submit" id="login_button" type="button" value="Log in">
<input name="submit" id="login_button" type="submit" value="Log in">
</form>
<div class="lost-password">
......
......@@ -12,7 +12,7 @@
<script type="text/javascript" src="${ settings.LIB_URL }jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="${ settings.LIB_URL }swfobject/swfobject.js"></script>
<script type="text/javascript" src="${ settings.LIB_URL }jquery.treeview.js"></script>
<script type="text/javascript" src="${ settings.LIB_URL }jquery.leanModal.min.js"></script>
<script type="text/javascript" src="/static/js/jquery.leanModal.min.js"></script>
<script type="text/javascript" src="/static/js/video_player.js"></script>
<script type="text/javascript" src="/static/js/schematic.js"></script>
<script type="text/javascript" src="/static/js/cktsim.js"></script>
......
......@@ -12,7 +12,7 @@
<script type="text/javascript" src="${ settings.LIB_URL }jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="${ settings.LIB_URL }jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="${ settings.LIB_URL }jquery.leanModal.min.js"></script>
<script type="text/javascript" src="/static/js/jquery.leanModal.min.js"></script>
<!--script type="text/javascript" src="${ settings.LIB_URL }swfobject/swfobject.js"></script-->
<!--script type="text/javascript" src="${ settings.LIB_URL }jquery.treeview.js"></script-->
<!--script type="text/javascript" src="/static/js/video_player.js"></script-->
......@@ -22,11 +22,11 @@
<script src="/static/js/html5shiv.js"></script>
<![endif]-->
<script type="text/javascript">
$(function(){
$("a[rel*=leanModal]").leanModal();
});
</script>
<script type="text/javascript">
$(function(){
$("a[rel*=leanModal]").leanModal();
});
</script>
<%block name="headextra"/>
......@@ -109,7 +109,8 @@ function postJSON(url, data, callback) {
$(document).ready(function(){
/* Handles when the user tries to log in. Grabs form data. Does AJAX.
Either shows error, or redirects. */
$('#login_button').click(function() {
$('form#login_form').submit(function(e) {
e.preventDefault();
var submit_data={};
$.each($("[id^=li_]"), function(index,value){
submit_data[value.name]=value.value;
......@@ -128,11 +129,21 @@ $(document).ready(function(){
);
});
$('#pwd_reset_button').click(function() {
$.post('/password_reset/',{ "csrfmiddlewaretoken" : "${ csrf }",
"email" : $('#id_email').val()}, function(data){
$('#pwd_reset').html(data);
});
$('form#pwd_reset_form').submit(function(e) {
e.preventDefault();
var submit_data = {};
submit_data['email'] = $('#id_email').val();
postJSON('/password_reset/',
submit_data,
function(json){
if (json.success) {
$('#pwd_reset').html(json.value);
} else {
$('#pwd_error').html(json.error);
}
}
);
});
});
......
......@@ -2,8 +2,9 @@
<p>Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one.</p>
<form action="/password_reset/" method="post">
<input type='hidden' name='csrfmiddlewaretoken' value='${ csrf }' />
<form id="pwd_reset_form">
<div id="pwd_error"></div>
<label for="id_email">E-mail address:</label>
<input id="id_email" type="email" name="email" maxlength="75" /> <input type="button" id="pwd_reset_button" value="Reset my password" />
<input id="id_email" type="email" name="email" maxlength="75" />
<input type="submit" id="pwd_reset_button" value="Reset my password" />
</form>
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
{% block content %}
<h1>Password reset successful</h1>
<p>We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly.</p>
{% endblock %}
File mode changed from 100755 to 100644
<h1>Password reset</h1>
<p>Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one.</p>
<form action="" method="post">{% csrf_token %}
{{ form.email.errors }}
<p><label for="id_email">E-mail address:</label> {{ form.email }} <input type="submit" value="Reset my password" /></p>
</form>
......@@ -93,7 +93,7 @@ div.leanModal_box {
}
}
input[type="button"] {
input[type="button"], input[type="submit"] {
@include button($mit-red);
font-size: 18px;
padding: lh(.5);
......
../data/problems/schematic_tutorial.html
\ No newline at end of file
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