Created
May 14, 2014 15:11
-
-
Save salsalabs/7a1d70a9e0c3bb9df520 to your computer and use it in GitHub Desktop.
This is a script that modifies the contents of the profile manager page. See the comments for more details.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$(document).ready(function() { | |
if (RegExp('profile/login').test(window.location.href)) { | |
$('a[onclick*=forgotpassword]') | |
.html("Click here to receive your password.") | |
.click(function() { | |
$('.login form').eq(0).hide(); | |
$('.login table').eq(0).hide(); | |
$('a[onclick*=forgotpassword]').hide(); | |
var x = $('#forgotpassword').html() | |
.replace('No problem.', '') | |
.replace('temporary', ''); | |
$('#forgotpassword').html(x); | |
// Copy the email address from the "Login now" form as needed. | |
var source = $('form[action*=processLogin]').find('input[name=Email]').val(); | |
var dest = $('form[action*=processForgotPassword]').find('input[name=Email]').val(source); | |
}) | |
$('a[onclick*=createaccount]').hide(); | |
} | |
}) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script was written for a client that needed these mods to the profile management page:
Forgot your password?
changed so something more friendly, andNot signed up yet?
hidden,That left a fairly unattractive message behind, so I also added these mods:
No problem.
It didn't make sense in the newly created context.temporary
. That would have confused folks that were going to use this page exactly once.Email
field from theLogin
so that the user would not have to type it again.Last note: This script must be in the default template to work, since that's the only template that the profile manager knows.