? Pending

User tests: Successful: Unsuccessful:

avatar Minei3oat
Minei3oat
22 Sep 2017

This PR adds the useglobal attiribute for the number form field.

Pull Request for Issue # .

Summary of Changes

Adds useglobal to JFormFieldNumber

Testing Instructions

Test the number field in a component, for example in the Category Blog:
Change in /components/com_content/views/category/tmpl/blog.xml#L182 the type from text to number.

Expected result

As with the type text: The global value should be displayed if no text is entered.

Actual result

The field is empty, the notice with the global value is missing.

Documentation Changes Required

Add a notice about useglobal to the Documentation: https://docs.joomla.org/Number_form_field_type.

avatar joomla-cms-bot joomla-cms-bot - change - 22 Sep 2017
Category Libraries
avatar Minei3oat Minei3oat - open - 22 Sep 2017
avatar Minei3oat Minei3oat - change - 22 Sep 2017
Status New Pending
avatar izharaazmi
izharaazmi - comment - 23 Sep 2017

@Minei3oat Can you please explain a little what we are trying to achieve here?

avatar Bakual Bakual - test_item - 23 Sep 2017 - Tested successfully
avatar Bakual
Bakual - comment - 23 Sep 2017

@izharaazmi It just adds the "Use Global" feature to the number formfield, similar to what is already there for a text field.
Result is this, where the first field is a number field and the second a text field:
image

avatar Bakual
Bakual - comment - 23 Sep 2017

I have tested this item successfully on 9cb083e


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

avatar izharaazmi
izharaazmi - comment - 23 Sep 2017

Thanks @Bakual. Looks like this is a new feature that I am unaware of so far. I'll look into the code for more.

avatar Bakual
Bakual - comment - 23 Sep 2017

It was a new feature in J3.7.0. See #11911 for reference

avatar izharaazmi
izharaazmi - comment - 23 Sep 2017

Oh thats great! 👍 My bad that I missed it.

avatar izharaazmi izharaazmi - test_item - 23 Sep 2017 - Tested successfully
avatar izharaazmi
izharaazmi - comment - 23 Sep 2017

I have tested this item successfully on 9cb083e


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 23 Sep 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 23 Sep 2017

RTC after two successful tests.

avatar vladimir179
vladimir179 - comment - 25 Sep 2017

Can you please explain a little what we are trying to Question here?


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

avatar Minei3oat
Minei3oat - comment - 25 Sep 2017

This PR adds the attribute useglobal to the number form field.
This functionality allows component developers to offer the possibility for the user to choose Use Global as option in the configuration of a menu item. JFormFieldNumber realizes this just as JFormFieldText: if you remove the content of the field, the component will use the value of the global configuration.
The global value with the notice is displayed as placeholder.
This option is not compatible with default and placeholder.

avatar mbabker mbabker - change - 5 Oct 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-10-05 12:23:28
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 5 Oct 2017
avatar mbabker mbabker - merge - 5 Oct 2017

Add a Comment

Login with GitHub to post a comment