User tests: Successful: Unsuccessful:
As title says.
To test, enable one (or both) of the Two Factor Authentification plugins, then edit a user (backend) or login and edit the user profile (frontend).
Tooltip should look as before patch, i.e.
Thanks @nikosdion for testing
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Title |
|
Category | ⇒ | Code style |
Easy | No | ⇒ | Yes |
Title |
|
Maybe we just have to add JHtml::_('bootstrap.tooltip');
?
My eclipse (Keppler) is real unhappy about each of these files and mark them with a red cross.
or, my eclipse would be satisfied with:
title="<?php echo '<strong>' . JText::_('COM_USERS_USER_FIELD_TWOFACTOR_LABEL') . '</strong><br />' . JText::_('COM_USERS_USER_FIELD_TWOFACTOR_DESC'); ?>">
instead of the existing
title="<strong><?php echo JText::_('COM_USERS_USER_FIELD_TWOFACTOR_LABEL') ?></strong><br /><?php echo JText::_('COM_USERS_USER_FIELD_TWOFACTOR_DESC') ?>">
test ok on 50% here
in backend all good, but on the site I got:
not very understand why, because strings looks the same
and small wish, can you please use JHtml::_('tooltipText', 'string1', 'string2');
instead of JHtml::tooltipText( 'string1', 'string2');
...
so people who override core JHtml::tooltipText
method, can be sure that it work as expected everywhere
This is why I proposed the second solution:
title="<?php echo '<strong>' . JText::_('COM_USERS_USER_FIELD_TWOFACTOR_LABEL') . '</strong><br />' . JText::_('COM_USERS_USER_FIELD_TWOFACTOR_DESC'); ?>">
so that we do not mess with js.
BTW: my screenshot above was in frontend.
not sure, I tried couple times, but string still untranslated, very strange...
JHtml::_('bootstrap.tooltip')
already loaded in the label layout layouts/joomla/form/renderlabel.php
, when Joomla render other fields ...
and I see no problem with use JHtml
here, as the label already has class class="hasTooltip"
, so tooltip script applies for this label, even without this patch
the strings were wrong for frontend in this patch ;)
I am correcting this now and follow @nikosdion advice to not use JHtml::tooltipText
I change the PR to use the alternative code to, at least, make Eclipse happy.
Please test again
test works good
Status | Pending | ⇒ | Ready to Commit |
Works & Nothing is broken. --> RTC Thanks.
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-08-21 13:50:09 |
Closed_By | ⇒ | rdeutz |
Labels |
Removed:
?
|
Milestone |
Added: |
My advice is to not touch it. Ttip text requires javascriot you are not
including as far as I can see. This will cause bc breaks in front-end. Not
on computer, reading code on phone. Please Don't touch it.