Topic-icon [9.0.215 Bugs] Show Forgot Username / Password

Active Subscriptions:

None
1 year 3 months ago - 1 year 3 months ago #68413 by joomleb
Hi guys, 
by following:
- Bug Fix: SCLogin - "Show the 'Show Password' button" setting not respected in Joomla 4 (jfbconnect-2390)
- Enh: SCLogin - Add style classes for forgot buttons (jfbconnect-2367)
PHP 7.4.33 + Joomla 4.2.6 > Bootstrap 5 getbootstrap.com/docs/5.0/components/buttons/ + JFBConnect 9.0.215
- Login View Setting > Show Forgot Username: ...dropdown menu...
- Login View Setting > Show Forgot Password: ...dropdown menu...

1 - on Joomla 4 (Bootstrap 5) those settings are not running, they are not adding any class. Please, Can you confirm ?
In teory, by default a "btn" should be always added into class, and then:
- None: a "display: none" should be added
- Black: "btn-secondary" should be added
- White: "btn-light" should be added
- Link: "btn-link" should be added
- Custom: a custom option should be added. Custom means: to add nothing, so we could use the default btn as start point (maintaining the proportions) to customize the buttons

2 - BUT, as far as I understand, you began "to move those settings" by adding the "Styles > Forgot Button CSS Class: ..."
That, unfortunately, right now it is adding the Class to the "a" level, while, from my point of view, it should add the class to the span (including the Username Icon "button" that right now is missing).
So, if I understood well, the BEST SOLUTION (for both, Joomla 3 and 4) would be to split the buttons settings:
- Login View Setting > Show Forgot Username: Yes / No
--- and then, remembering to delete the "Styles > Forgot Button CSS Class: ..."
--- to add a Styles > Icon Username Button CSS Class: ...
--- to add a Styles > Forgot Username Button CSS Class: ...
- Login View Setting > Show Forgot Password: Yes / No
--- to add a Styles > Show / Hide Password Button CSS Class: ...
--- to add a Styles > Forgot Password Button CSS Class: ...
Last edit: 1 year 3 months ago by joomleb.
The topic has been locked.
Active Subscriptions:

None
1 year 2 months ago #68475 by joomleb
Hi guys, 
Please, Do you have answers here ?
The topic has been locked.
Support Specialist
1 year 2 months ago #68483 by mel
What you're proposing sounds reasonable. I'm going to be putting a release out soon. I'll look into updating for these.

-Melissa
The topic has been locked.
Active Subscriptions:

None
1 year 2 months ago #68485 by joomleb
Hi Melissa, 
Thank You for your answer here. I'll stay tuned, meanwhile I remain available here...
The topic has been locked.
Support Specialist
1 year 1 month ago #68499 by mel
Ok, after looking through the code and settings (they were a mess I agree), I cleaned it up. Here's a test build of SCLogin for you if you'd like to test it out before the release I'm working on. I'm still making changes and testing before putting out a release.

Specifically, for the issues you mentioned:

1 - on Joomla 4 (Bootstrap 5) those settings are not running, they are not adding any class. Please, Can you confirm ?
In teory, by default a "btn" should be always added into class, and then:
- None: a "display: none" should be added
- Black: "btn-secondary" should be added
- White: "btn-light" should be added
- Link: "btn-link" should be added
- Custom: a custom option should be added. Custom means: to add nothing, so we could use the default btn as start point (maintaining the proportions) to customize the buttons
 

- I don't think it makes sense to have the Black vs White buttons anymore, now that we've introduced the style class for the forgot username and forgot password. Back in the day, it was for the color of the question mark icons, not the button itself.
- I changed the options to None, Button and Text Link. If you want to add a button class like btn-light or btn-secondary, you can go into the styles tab to assign the appropriate forgot button.
- If none is selected, we don't add a display:none, as we don't even put the element on the page, as text links are added in a different place in the template than buttons it gets kind of confusing code-wise.
- I added the btn-link class if the text link is chosen.
- I added the btn class to the forgot buttons

2 - BUT, as far as I understand, you began "to move those settings" by adding the "Styles > Forgot Button CSS Class: ..."
That, unfortunately, right now it is adding the Class to the "a" level, while, from my point of view, it should add the class to the span (including the Username Icon "button" that right now is missing).
So, if I understood well, the BEST SOLUTION (for both, Joomla 3 and 4) would be to split the buttons settings:
- Login View Setting > Show Forgot Username: Yes / No
--- and then, remembering to delete the "Styles > Forgot Button CSS Class: ..."
--- to add a Styles > Icon Username Button CSS Class: ...
--- to add a Styles > Forgot Username Button CSS Class: ...
- Login View Setting > Show Forgot Password: Yes / No
--- to add a Styles > Show / Hide Password Button CSS Class: ...
--- to add a Styles > Forgot Password Button CSS Class: ...

* I changed the style class to be on the span
* I added the additional class options / split the forgot buttons
* I added a default btn class to all buttons except for that user icon button in J4. If you put btn on it in Joomla 4, it conflicts with the default template and doesn't appear to be needed as it's an icon and not an actual button.
* I've tested this with J3 JFBConnect set to Bootstrap 2, J3 JFBConnect set to Bootstrap 5, J4 Bootstrap 5. If you see any weird behavior, let me know the configuration you're testing.

-Melissa
The topic has been locked.