WordPress.org

Make WordPress Core

Opened 7 months ago

Last modified 4 months ago

#49182 new enhancement

Unmask password button

Reported by: bernardroux Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 2.7
Component: Posts, Post Types Keywords: close has-patch
Focuses: Cc:

Description

Hello,
I would like to add an “eye” (connection protected pagefile) of visibility of the Password because many people without a numeric keypad Keyboard believe entering numbers while entering lowercase type [in French : é ”' (-è_çà] the fact that only * appear when connecting to protected pages (protected page file)
Regards

Attachments (2)

added__show_hide_toggle_to_password_field_of_password_protected_post_form_.patch (8.1 KB) - added by mikhailroot 4 months ago.
updated post password frontend form field with show\hide password toggle, js\css files are included as well as modified get_the_password_form() and get_the_content() functions of /wp-includes/post-template.php
built_files.zip (42.0 KB) - added by mikhailroot 4 months ago.
Built js\css and updated PHP files meant to be merged into non development WordPress version.

Download all attachments as: .zip

Change History (17)

#1 follow-up: @johnbillion
7 months ago

  • Component changed from General to Posts, Post Types
  • Keywords needs-patch good-first-bug added
  • Version changed from 5.3.2 to 2.7

This functionality exists in a few places within the WordPress admin area. It should be possible to add it to the password protected post form too.

#2 in reply to: ↑ 1 @apieschel
7 months ago

Replying to johnbillion:

This functionality exists in a few places within the WordPress admin area. It should be possible to add it to the password protected post form too.

I've been looking into a patch, and adding the markup to get_the_password_form() in wp-includes/post-template.php looks to be relatively straightforward. However, it doesn't seem right to load the same Javascript functionality as is loaded for the admin views, such as the bindToggleButton() function in wp-admin/js/user-profile.js, since this will be for a front end post view.

For something like this, does it make sense to create a new script file in wp-includes/js/ ?

Version 0, edited 7 months ago by apieschel (next)

#3 @bernardroux
7 months ago

At @johnbillion and @apieschel.
Thank you for your quick responses.
"For something like this, does it make sense to create a new script file in wp-includes/js/"
I think this suggestion is a good idea.
Note: I am not a champion of JS scripts at all and and it would be better to have the file in its entirety.
Thanks you anywhere

#4 @carriganvb
5 months ago

Hello, first time contributor here.

@bernardroux I'm trying to find out which password entry you'd like to see updated. I'm running 5.3.2 and wp-login.php has a password field with an eye button to toggle password visibility.

So, perhaps this enhancement has already been delivered? Or perhaps there's another place where the password field can be found in wordpress where you'd like to see the eye toggler.

Let me know if I need to clarify or if I have misunderstood the enhancement request.

-Carrigan

#5 @bernardroux
5 months ago

Hello Carrigan,
When you have a publication (page) which is password protected, you need to fill the password field. It should be nice to have an eye button to toggle password visibility.
I don't speak for about the password field of the wp-login.php.
Thanks a lot
Bernard

#6 @carriganvb
5 months ago

Thank you @bernardroux I'll take a look and see if I can't find where the publication password appears.

Thanks,
-Carrigan

#7 @carriganvb
5 months ago

@bernardroux OK I found what you mean. The password on the published pages that are password protected. I think I understand the problem... Now to fix it!

#8 @bernardroux
5 months ago

To Carrigan,
That exactly what I meaned.
Thank you for your consideration
I wait you fix it!
Thank's a lot
Bernard

@mikhailroot
4 months ago

updated post password frontend form field with show\hide password toggle, js\css files are included as well as modified get_the_password_form() and get_the_content() functions of /wp-includes/post-template.php

#9 follow-up: @mikhailroot
4 months ago

Good day @bernardroux seeing no one in several weeks has proposed a patch for it I've done it.
See code in added__show_hide_toggle_to_password_field_of_password_protected_post_form_.patch
I've used trunk (5.5.0 as a base).

#10 in reply to: ↑ 9 ; follow-up: @bernardroux
4 months ago

Replying to mikhailroot:

Good day @bernardroux seeing no one in several weeks has proposed a patch for it I've done it.
See code in added__show_hide_toggle_to_password_field_of_password_protected_post_form_.patch
I've used trunk (5.5.0 as a base).

Hello @mikhailroot,
Thank you very much for your volunteer contribution.
As we are confined to France at home because of the Sars-cod 2 / Covid 19, I found the time to try to modify the different files offered.

  • Currently I use mysql 5.6
  • src/js/_enqueues/lib/wp-post-pwd.js, I found the folder "/js" in www/wp-incudes/js
  • src/wp-includes/css/wp-post-pwd.css no problem to include it in the right folder
  • src/wp-includes/post-template.php idem
  • src/wp-includes/script-loader.php idem
  • But I didn't find "Gruntfile.js" anywhere

Thanks if you can edit your files again so I can fix them.
Thank you in advance
Bernard Roux

@mikhailroot
4 months ago

Built js\css and updated PHP files meant to be merged into non development WordPress version.

#11 in reply to: ↑ 10 @mikhailroot
4 months ago

  • Keywords needs-patch removed

The thing is patch is applied to SVN repository (trunk) and it has Gruntfile.js and a bit different sources file structure (as it's meant to run Grunt to build\copy css\js files into necessary folders via npm run build).
See https://make.wordpress.org/core/handbook/tutorials/installing-wordpress-locally/ on how to install development version of WordPress which has files and directory structure I've used with this patch.

I've built files and here's zip file with this update which reside in wp-includes, zip is created from WordPress root directory (not a dev version of WordPress).
https://core.trac.wordpress.org/attachment/ticket/49182/built_files.zip

So you can merge files from this zip with your non development WordPress version.

Replying to bernardroux:

Replying to mikhailroot:

Good day @bernardroux seeing no one in several weeks has proposed a patch for it I've done it.
See code in added__show_hide_toggle_to_password_field_of_password_protected_post_form_.patch
I've used trunk (5.5.0 as a base).

Hello @mikhailroot,
Thank you very much for your volunteer contribution.
As we are confined to France at home because of the Sars-cod 2 / Covid 19, I found the time to try to modify the different files offered.

  • Currently I use mysql 5.6
  • src/js/_enqueues/lib/wp-post-pwd.js, I found the folder "/js" in www/wp-incudes/js
  • src/wp-includes/css/wp-post-pwd.css no problem to include it in the right folder
  • src/wp-includes/post-template.php idem
  • src/wp-includes/script-loader.php idem
  • But I didn't find "Gruntfile.js" anywhere

Thanks if you can edit your files again so I can fix them.
Thank you in advance
Bernard Roux

#12 @mikhailroot
4 months ago

  • Keywords has-patch added

#13 @bernardroux
4 months ago


Hello @mikhailroot,and Good easter
Thanks a lot for the new elements

I forgot to tell you that I have a web host called "OVHcloud" well known in Europe and I have access to my database either by "phpMyadmin" tools from my host or directly by FTP with Filezilla and can modify or create files on my database.
Also if I understood correctly I can directly insert or replace the modified "built_files" files in the appropriate folders without using gruntfile, (ie wp-includes - wp-includes/css - wp-includes/js)
Regards
Bernard Roux

#14 @bernardroux
4 months ago

  • Keywords close added; good-first-bug has-patch removed

Hello @mikhailroot
After several hesitations, I downloaded the different files to my database.
Excellent result see the example below
https://www.evab.fr/?page_id=3250.
https://www.evab.fr/
We can close the ticket. (can you tell me how to do?)
Thank you for your help - see you soon
Спасибо за ваше сотрудничество. До скорой встречи, может быть!

#15 @mikhailroot
4 months ago

  • Keywords has-patch added

Good day @bernardroux !

I'm happy it worked for you. Yes you can just replace files in your WordPress directory with ones from built_files.zip

The thing is these changes will be overwritten upon your next WordPress update. We need to wait so that patch will be agreed to be applied to WordPress Core by WordPress core team. So I consider ticket doesn't need to be closed, otherwise when it gets closed Core Team probably will not merge this update.

Note: See TracTickets for help on using tickets.