Pending

User tests: Successful: Unsuccessful:

avatar amone4
amone4
21 Mar 2018

replaced the jquery in my already uploaded code, with js

Pull Request for Issue # .

Summary of Changes

Testing Instructions

Expected result

Actual result

Documentation Changes Required

avatar amone4 amone4 - open - 21 Mar 2018
avatar amone4 amone4 - change - 21 Mar 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 21 Mar 2018
Category JavaScript
avatar amone4 amone4 - change - 21 Mar 2018
Title
updated passwordstrength.js to solve issue #19231
updated passwordstrength.js to related to issue #19231
avatar amone4 amone4 - edited - 21 Mar 2018
avatar dgt41
dgt41 - comment - 21 Mar 2018

Nice, but we don't need javascript to do width restriction here, css is invented just for that:
screen shot 2018-03-21 at 23 29 46

joomla-field-password > .progress {
	max-width: 277px;
}
avatar amone4
amone4 - comment - 22 Mar 2018

I don't know where all this script would be used, as this can be used to generate a password strength bar on any page. The width of form fields might vary and might occupy more space than 277px. That's why I used js to resize the bar, according to the corresponding form field

avatar C-Lodder
C-Lodder - comment - 22 Mar 2018

Markup:

<joomla-field-password>
    <div class="password-input-wrapper">
        <input type="password" class="form-control">
        <div class="progress"></div>
    </div>
</joomla-field-password>

SCSS:

$input-max-width: 240px;

.password-input-wrapper {
   max-width: $input-max-width;
}

Progress bar will be 100% width as it's a block element and contained within the wrapper.

No need for JS on this at all

avatar amone4
amone4 - comment - 22 Mar 2018

If we can change the markup and style of elements other than the progress bar, then the issue can be solved just by appending the following in passwordstrength.js

fields[i].parentElement.parentElement.style.width = 'fit-content';

The solution works. Should I make a pull request?

avatar C-Lodder
C-Lodder - comment - 22 Mar 2018

Nothing needs to be appended. It simply needs a wapper as shown above. There's already a pending PR for this so any changes should be made there

avatar amone4
amone4 - comment - 22 Mar 2018

Joomla's code already makes up a wrapper with class password-group. I'm just asking if we could style that with width: fit-content, because it does the issue.

image

avatar dgt41
dgt41 - comment - 22 Mar 2018

Joomla's code already makes up a wrapper with class password-group. I'm just asking if we could style that with width: fit-content, because it does the issue.

The code you're looking at is deprecated!
Please follow our suggestions and use #19231 as your base...

avatar joomla-cms-bot joomla-cms-bot - close - 7 Apr 2018
avatar Quy Quy - change - 7 Apr 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-04-07 01:49:52
Closed_By Quy
avatar joomla-cms-bot joomla-cms-bot - change - 7 Apr 2018
Closed_Date 2018-04-07 01:49:52 2018-04-07 01:49:53
Closed_By Quy joomla-cms-bot
avatar joomla-cms-bot
joomla-cms-bot - comment - 7 Apr 2018

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/19963

Add a Comment

Login with GitHub to post a comment