?
avatar Sophist-UK
Sophist-UK
7 Feb 2018

Steps to reproduce the issue

Create a forms.xml with a spacer (no hr) and e.g. a list, both with label and description.

Render the forms.xml.

Expected result

Both spacer and list fields should use .hasPopover class, and should have similar styled tooltips.

Actual result

Spacer field has incorrect style because it uses .hasTooltip instead.

System information (as much as possible)

J3.8.4,

Additional comments

This is because /libraries/joomla/form/fields/spacer.php does not use the standard FormFields.php getLabel and renderField methods but instead has its own methods. IMO the getLabel method should limit itself to handling hr="true" and call parent.getLabel for anything else.

avatar Sophist-UK Sophist-UK - open - 7 Feb 2018
avatar joomla-cms-bot joomla-cms-bot - change - 7 Feb 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 7 Feb 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Feb 2018
Category Code style
avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Feb 2018
Priority Medium Low
avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Feb 2018
Category Code style Code style Libraries
avatar brianteeman
brianteeman - comment - 15 Feb 2018

What is the usecase for having a tooltip/popover on a spacer?

avatar Sophist-UK
Sophist-UK - comment - 15 Feb 2018

The use case is that the spacer is essentially a label without a field, and my form uses lots of labels with tooltips including the spacer.

The tooltip on the spacer works, but looks very different - and this is because unlike every other form field type, the spacer form field does not use the parent getLabel method but does its own thing and does it differently.

avatar Sophist-UK
Sophist-UK - comment - 15 Feb 2018

There is no point (IMO) in having a tooltip on an "hr" version of spacer, so this is an exception.

avatar franz-wohlkoenig franz-wohlkoenig - change - 16 Feb 2018
Status New Discussion
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar brianteeman
brianteeman - comment - 14 Apr 2018

@Sophist-UK will you be able to submit a pull request for this?

avatar franz-wohlkoenig franz-wohlkoenig - change - 14 Apr 2018
Status Discussion Information Required
avatar joomla-cms-bot joomla-cms-bot - unlabeled - 14 Apr 2018
avatar Sophist-UK
Sophist-UK - comment - 14 Apr 2018

@brianteeman Sorry Brian - I looked at it and how we do tooltips on every other field type and couldn't easily spot how to do it.

However, if you can create the database shim discussed in #19367 and needed for a J4 version of that PR, then I will take another look at this issue and spend the time trying to do a PR for it.

avatar franz-wohlkoenig franz-wohlkoenig - change - 16 Apr 2018
Status Information Required Discussion
avatar Quy Quy - change - 26 May 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-05-26 20:15:55
Closed_By Quy
avatar joomla-cms-bot joomla-cms-bot - change - 26 May 2018
Closed_Date 2018-05-26 20:15:55 2018-05-26 20:15:56
Closed_By Quy joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 26 May 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 26 May 2018

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

avatar Quy
Quy - comment - 26 May 2018

Add a Comment

Login with GitHub to post a comment