Feature RTC Language Change Updates Requested PBF PR-5.1-dev Pending

User tests: Successful: Unsuccessful:

avatar Razzo1987
Razzo1987
30 Jan 2024

Improving @brianteeman PR #41122 to extend to field lists.
Thanks to @alikon for the support.

Summary of Changes

Extending the possibility of using the header to list fields as well.
So moving some code from SqlField.php to ListField.php.

Testing Instructions

  1. Create a file of type List

  2. Create a file of type SQL

  3. Create a XML field and add header option

Actual result BEFORE applying this Pull Request

  1. you cannot specify the header, so the first value in the list is always selected when creating an article (even if the field is indicated as not required)
  2. You can specify the header to obviate the problem described in case 1.

Expected result AFTER applying this Pull Request

  1. You may now specify the header

  2. The SQL field still works

  3. now you can add the header from XML too

Link to documentations

Please select:

  • Documentation link for docs.joomla.org: List_form_field_type

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

Note:
Eg of SQL query for SQL Field (you need to create some articles for example from sample data):

SELECT #__content.id AS value, #__content.title AS text
FROM #__content

Eg of XML list field:

	<field
		name="test"
		type="list"
		label="test"
		validate="options"
		header="Please select your option"
		>
		<option value="1">JYES</option>
		<option value="0">JNO</option>
	</field>

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
4.00

avatar Razzo1987 Razzo1987 - open - 30 Jan 2024
avatar Razzo1987 Razzo1987 - change - 30 Jan 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jan 2024
Category Administration Language & Strings Libraries Front End Plugins
avatar Razzo1987 Razzo1987 - change - 30 Jan 2024
The description was changed
avatar Razzo1987 Razzo1987 - edited - 30 Jan 2024
avatar Razzo1987 Razzo1987 - change - 30 Jan 2024
Labels Added: Language Change PR-5.1-dev
avatar Razzo1987 Razzo1987 - change - 31 Jan 2024
Labels Added: Feature
avatar Razzo1987
Razzo1987 - comment - 31 Jan 2024

Thanks @Quy !

avatar faustonenci faustonenci - test_item - 24 Feb 2024 - Tested successfully
avatar faustonenci
faustonenci - comment - 24 Feb 2024

I have tested this item ✅ successfully on 9c12907

good works


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

avatar walturbo walturbo - test_item - 24 Feb 2024 - Tested successfully
avatar walturbo
walturbo - comment - 24 Feb 2024

I have tested this item ✅ successfully on 9c12907


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

avatar alikon alikon - change - 24 Feb 2024
Status Pending Ready to Commit
avatar alikon
alikon - comment - 24 Feb 2024

RTC


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

avatar adj9 adj9 - test_item - 24 Feb 2024 - Not tested
avatar adj9
adj9 - comment - 24 Feb 2024

I have not tested this item.

its ok


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

avatar bembelimen
bembelimen - comment - 1 Mar 2024

I see the benefit of this PR, but there should be the following considerations:

  • "Header" is for sure the wrong naming for such a parameter
  • There should be a "show on" function to depend on the "required" field
  • Consider a language string as default?
avatar bembelimen
bembelimen - comment - 2 Mar 2024

Ok, @LadySolveig fought for this PR and convinced me, that we should merge it, so here we go!

avatar bembelimen bembelimen - change - 2 Mar 2024
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2024-03-02 16:34:24
Closed_By bembelimen
Labels Added: RTC Updates Requested PBF
avatar bembelimen bembelimen - close - 2 Mar 2024
avatar bembelimen bembelimen - merge - 2 Mar 2024
avatar bembelimen
bembelimen - comment - 2 Mar 2024

Thx

Add a Comment

Login with GitHub to post a comment