Skip to content

LUTECE-2189 : Add a button to display the password on the login page #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

rzara
Copy link
Member

@rzara rzara commented Dec 27, 2017

The button is only added if javascript is active. When first loaded, the password is
displayed with bullets.
Displaying the password can help enter it, and thus encourage choosing a stronger one.

The button is only added if javascript is active. When first loaded, the password is
displayed with bullets.
Displaying the password can help enter it, and thus encourage choosing a stronger one.
@@ -49,4 +49,23 @@
var bgImg = 'url(' + randomImages[rndNum] + ')';
$("#login-page").css('background-image', bgImg );
});
$(document).ready(function() {
var buttonGroup = $("<span class='input-group-btn'><button type='button' class='btn btn-flat' title='${i18n('portal.admin.admin_login.showPassword')?html}'><span class='fa fa-eye'></span><span class='sr-only'>${i18n('portal.admin.admin_login.showPassword')?html}</span></button></span>");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use "message?js_string?html here" ? This way if we add the ' character it won't break ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems so, yes (for the occurence inside the title attibute)

Copy link
Member

@jonenst jonenst Jan 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not all -5- edit 6 occurences ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it cannot hurt to do it everywhere, I guess, but only this occurence is susceptible to break if a ' is unescaped.

?html escaping is sufficient because the values are only enclosed in double
quotes, so single quote escapting is not necessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants