Skip to content

Commit

Permalink
now show the independent login page if correct hash in url (#683)
Browse files Browse the repository at this point in the history
  • Loading branch information
qsollet authored and CelineBoudier committed Mar 22, 2018
1 parent fb4a0ab commit ca63cc5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions portal/static/portal/js/student_login.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,10 @@ function showCorrectLogin(INDEPENDENT_STUDENT_VIEW) {
$('#switchToSchool').click();
}
}

$(document).ready(function() {
if (window.location.hash == '#independent-student-login') {
$('#school-login').hide();
$('#independent-student-login').show();
}
})
4 changes: 2 additions & 2 deletions portal/templates/portal/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h1>Log in as a student</h1>
<p>Don&rsquo;t worry, just ask your school or club teacher who will have these details.</p>

<p>Are you registered as an independent student who is not part of a school or club?
If so, <a href='#' id='switchToIndependentStudent'>log in here</a>.</p>
If so, <a href='#independent-student-login' id='switchToIndependentStudent'>log in here</a>.</p>
</div>
</div>
<div id="independent-student-login" class="form--register form--register--indep-student col-sm-6">
Expand Down Expand Up @@ -113,7 +113,7 @@ <h1>Log in as an independent student</h1>
<p>Don&rsquo;t worry, you can
<a id="student_forgotten_password_button" href="{% url 'student_password_reset' %}">reset your password</a>.
</p>
<p>Part of a school or club? <a href='#' id='switchToSchool'>Log in here</a>.</p>
<p>Part of a school or club? <a href='#school-login' id='switchToSchool'>Log in here</a>.</p>
</div>
</div>
</div>
Expand Down

0 comments on commit ca63cc5

Please sign in to comment.