? ? ? Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
4 Oct 2019

Pull request for #26459

The docblock in all fields is wrong

* @var string $autocomplete Autocomplete attribute for the field.

All we ever do is see if it is "on" or "off"

For example

!$autocomplete ? 'autocomplete="off"' : '',

Which means that we can never have any value for autocomplete in the xml other than 'off'

You can see this by changing the value for autocomplete here to anything else and instead of the autocomplete being output with the new value it is removed.

<field
name="password"
type="password"
label="JGLOBAL_PASSWORD"
autocomplete="off"
class="validate-password-strength"
filter="raw"
validate="password"
strengthmeter="true"
force="on"
size="30"

Autocomplete has a lot of useful values that we could/should be using see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete

For example autocomplete=off really doesn't do anything on password fields. Instead we should be using autocomplete="new-password"

This PR allows for the correct usage of the autocomplete element so that it supports all element values.

Testing is super simple. Apply the PR and then edit or add an autocomplete element to any field xml and see what is generated in the source

avatar brianteeman brianteeman - open - 4 Oct 2019
avatar brianteeman brianteeman - change - 4 Oct 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Oct 2019
Category Layout Libraries
avatar brianteeman brianteeman - change - 4 Oct 2019
Labels Added: ?
avatar Quy Quy - test_item - 4 Oct 2019 - Tested successfully
avatar Quy
Quy - comment - 4 Oct 2019

I have tested this item successfully on 3886e84


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26467.

avatar bembelimen bembelimen - test_item - 5 Oct 2019 - Tested successfully
avatar bembelimen
bembelimen - comment - 5 Oct 2019

I have tested this item successfully on 3886e84


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26467.

avatar alikon alikon - change - 5 Oct 2019
Status Pending Ready to Commit
avatar alikon
alikon - comment - 5 Oct 2019

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26467.

avatar wilsonge wilsonge - change - 6 Oct 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-10-06 20:53:18
Closed_By wilsonge
Labels Added: ? ?
avatar wilsonge wilsonge - close - 6 Oct 2019
avatar wilsonge wilsonge - merge - 6 Oct 2019
avatar wilsonge
wilsonge - comment - 6 Oct 2019

Thanks!

avatar brianteeman
brianteeman - comment - 6 Oct 2019

Thanks

Add a Comment

Login with GitHub to post a comment