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
Show_pw #2099
Closed
Closed
Show_pw #2099
Conversation
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
"Suggested search results give the wrong count #1923" .gitignore: Added .idea to list of directories in .gitignore. Used by PyCharm IDE. warehouse/templates/search/results.html: Removed the following lines from "suggestion_link" macro to remove display of counts in results messages per discussions in thread for bug #1923: {% if freq > 1 %} <span>({{ freq }} results)</span> {% endif %}
This reverts commit 85c2b0c.
"Suggested search results give the wrong count #1923" .gitignore: Added .idea to list of directories in .gitignore. Used by PyCharm IDE. warehouse/templates/search/results.html: 1) Removed the following lines from "suggestion_link" macro to remove display of counts in results messages per discussions in thread for bug #1923: {% if freq > 1 %} <span>({{ freq }} results)</span> {% endif %} 2) Added 'id=order' to <select...> element (line 143) to properly associate the <label...> element on line 142/
Fix "Suggested search results give the wrong count #1923" .gitignore: Added .idea to list of directories in .gitignore. Used by PyCharm IDE. warehouse/templates/search/results.html: 1) Removed the following lines from "suggestion_link" macro to remove display of counts in results messages per discussions in thread for bug #1923: {% if freq > 1 %} <span>({{ freq }} results)</span> {% endif %} 2) Added 'id=order' to <select...> element (line 143) to properly associate the <label...> element on line 142.
Removed "{% set freq = best_guess.freq %}" from suggestion_link macro. Since display of search count has been removed this line no longer necessary.
Gulpfile.babel.js: Added entry in `files' list for "pw-mask-toggle.js" for "dist:js" task. Modified comment and added statement for mapping output chunk for minified pw-mask-toggle.js. warehouse/csp.py: Added "ajax.googleapis.com" to `script-src' list for accesssing jQuery library. warehouse/templates/accounts/login.html: Added "-js-pw-m-fld" to form.password "class_" attribute. Added <label ...><input ...> statement for "Show password" checkbox. Added "-js-pw-m-sbt" to Login submit button "class=" attribute.. Added {% block extra_js %} (including explanatory comments) for loading "jQuery" and "pwmask" JS code. warehouse/templates/accounts/register.html: Added "-js-pw-m-fld" to form.password and form.confirm_password "class_=" attribute. Added <label ...><input ...> statement for "Show password" checkbox. Added comments and code to {% block extra_js %} for loading "jQuery" and "pwmask" JS code. New File => warehouse/static/js/pwmask/pw-mask-toggle.js: JS code that handles password field (un)masking. Also includes event handler to remove the checkbox element from the form thus prevent polluting the POST data sent on Submit.
Only cosmetic changes to satisfy "make lint". Additional notes. Since pw-mask-toggle.js requires jQuery support eslint will complain "$ is not defined". This is an "error" that can be ignored. I just haven't figured out how to get eslint to accepts the jQuery references. I forgot to mention I have no means of testing the password unmasking code under IE (I run a Linux box and have no access to an IE browser to test with). I believe the code for unmasking the password for IE (it's the "catch" if the "try" fails) should work. It would be great if someone with access to an IE browser could double check that code.
This pull request has been superseded by PR Show_PW #2145. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This branch includes changes made to allow (un)masking the password input elements by clicking a "Show password" checkbox. Note that there are two additional commits in this branch that were part of changes submitted for fixing bug #1923 (.gitignore and results.html). Not sure why these are showing up since I have not made any additional changes to these files. Perhaps it's because I don't have a full grasp of using git yet. If they should get pulled in nothing will break.
The remaining commits in this branch all address (un)masking password using a "Show password" checkbox.