Merge pull request #909 from MITx/fix/cdodge/signup-tweeks
don't show courses/create new course if account has not been activated. ...
This commit is contained in:
@@ -118,7 +118,8 @@ def index(request):
|
||||
course.location.org,
|
||||
course.location.course,
|
||||
course.location.name]))
|
||||
for course in courses]
|
||||
for course in courses],
|
||||
'user': request.user
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<div class="inner-wrapper">
|
||||
<h1>My Courses</h1>
|
||||
<article class="my-classes">
|
||||
% if user.is_active:
|
||||
<a href="#" class="new-course-button"><span class="plus-icon"></span> New Course</a>
|
||||
<ul class="class-list">
|
||||
%for course, url in courses:
|
||||
@@ -35,8 +36,15 @@
|
||||
-->
|
||||
</a>
|
||||
</li>
|
||||
%endfor
|
||||
%endfor
|
||||
</ul>
|
||||
% else:
|
||||
<div class='warn-msg'>
|
||||
<p>
|
||||
In order to start authoring courses using edX studio, please click on the activation link in your email.
|
||||
</p>
|
||||
</div>
|
||||
% endif
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -55,10 +55,11 @@
|
||||
if(json.success) {
|
||||
location.href = "${reverse('index')}";
|
||||
} else if($('#login_error').length == 0) {
|
||||
$('#login_form').prepend('<div id="login_error">Email or password is incorrect.</div>');
|
||||
$('#login_form').prepend('<div id="login_error">' + json.value + '</div>');
|
||||
$('#login_error').slideDown(150);
|
||||
} else {
|
||||
$('#login_error').stop().slideDown(150);
|
||||
$('#login_error').html(json.value);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<%inherit file="base.html" />
|
||||
<%! from django.core.urlresolvers import reverse %>
|
||||
|
||||
<%block name="title">Sign up</%block>
|
||||
<%block name="bodyclass">no-header</%block>
|
||||
|
||||
@@ -82,7 +84,7 @@
|
||||
submit_data,
|
||||
function(json) {
|
||||
if(json.success) {
|
||||
$('#register').html(json.value);
|
||||
location.href = "${reverse('index')}";
|
||||
} else {
|
||||
$('#register_error').html(json.value).stop().slideDown(150);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user