Skip to content

Commit

Permalink
Revert "Add urls for change_password modal and login modal. (#154) (#155
Browse files Browse the repository at this point in the history
)"

Alternative logic is used in the dev1 branch - so reverting this
This allows for the dev1 branch to be merged easily...

This reverts commit 0a2cff1.
  • Loading branch information
IsmailM committed Jul 30, 2017
1 parent cf12229 commit e066314
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 33 deletions.
18 changes: 3 additions & 15 deletions static/assets/js/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,9 @@ if (!PP) {
PP.submitChangePassword();
});

// Open the login modal or the change password modal, if requested by the url.
if (window.location.href.indexOf('#login') != -1) {
$('#login_modal').modal('open');
}
else if (window.location.href.indexOf('#change_password') != -1) {
$('#login_modal').modal('open');
PP.showChangePasswordForm();
}

// Change password modal - check the re-typing of the new password.
$("#new_password_1, #new_password_2").keyup(PP.checkPasswordMatch);
$(document).ready(function () {
$("#new_password_1, #new_password_2").keyup(PP.checkPasswordMatch);
});

};

Expand Down Expand Up @@ -94,7 +86,6 @@ if (!PP) {
$('#change_password_btn').hide();
$('#register_btn').hide();
$('#submit_change_password_btn').hide();
$('#search_btn').hide();

$('#login_btn').hide();
$('#demo_login_btn').hide();
Expand All @@ -116,7 +107,6 @@ if (!PP) {

$('#login_btn').hide();
$('#demo_login_btn').hide();
$('#search_btn').hide();

$('#register_content').hide();
$('#submit_register_btn').hide();
Expand All @@ -140,7 +130,6 @@ if (!PP) {
$('#enter_login_btn').hide();
$('#submit_register_btn').hide();
$('#submit_change_password_btn').hide();
$('#search_btn').hide();
};

//
Expand Down Expand Up @@ -190,7 +179,6 @@ if (!PP) {
$('#auth_modal').modal('close');
$('#change_password_successful').show();
$("#change_password_successful").text(data.success);
$('#search_btn').show();
},
error: function (data, msg) {
$('#auth_modal').modal('close');
Expand Down
1 change: 0 additions & 1 deletion templates/components/login_modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ <h4>Change Password</h4>
<!-- Right side of footer -->
<a id="submit_register_btn" href="#!" class="waves-effect waves-green btn-flat" style="display: none;">Submit</a>
<a id="submit_change_password_btn" href="#!" class="waves-effect waves-green btn-flat" style="display: none;">Change Password</a>
<a id="search_btn" href="/search" class="waves-effect waves-green btn-flat" style="display: none;">Search Phenopolis</a>
<a id="login_btn" href="#!" class="waves-effect waves-green btn-flat">Login</a>
<a id="demo_login_btn" href="#!" class="waves-effect waves-green btn-flat">Demo Login</a>
</div>
Expand Down
17 changes: 0 additions & 17 deletions views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,6 @@ def login():
print 'LOGIN SUCCESS'
return jsonify(success="Authenticated"), 200

#
@app.route('/login', methods=['GET'])
def login_form():
if config.LOCAL:
return redirect('/#login')
else:
return redirect('https://uclex.cs.ucl.ac.uk/#login')

#
@app.route('/logout')
def logout():
Expand Down Expand Up @@ -218,15 +210,6 @@ def change_password():
msg = 'Password for username \''+username+'\' changed. You are logged in as \''+username+'\'.'
return jsonify(success=msg), 200

#
@app.route('/change_password', methods=['GET'])
def change_password_form():
if config.LOCAL:
return redirect('/#change_password')
else:
return redirect('https://uclex.cs.ucl.ac.uk/#change_password')


@app.route('/set/<query>')
def set(query):
value = query
Expand Down

0 comments on commit e066314

Please sign in to comment.