? Failure
Referenced as Related to: # 11207

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
22 Oct 2016

Pull Request for Issue #12517.

Summary of Changes

Add more flexibility to requires attribute in form list options.
Also, extend funcionality of the requires to the main fields. Do not setup the fields if requirements are not fulfilled.

Testing Instructions

  • Do a code review
  • Apply this patch on 3.7.x
  • Add this to a joomla form xml
<field
    name="test 1"
    type="list"
    label="Test 1"
    description="Test 1"
    >
    <option value="">Check</option>
    <!-- B/C tests -->
    <option value="a1" requires="multilanguage">B/C multilanguage</option>
    <option value="a2" requires="associations">B/C associations</option>
    <option value="a3" requires="vote">B/C vote</option>
    <!-- New options tests -->
    <option value="b1" requires="com_search">com_search</option>
    <option value="b2" requires="com_search{show_date:1}">com_search{show_date:1}</option>
    <option value="b3" requires="config{ftp_enable:1}">config{ftp_enable:1}</option>
    <option value="b4" requires="config{mailonline:1[AND]mailer:smtp}">config{mailonline:1[AND]mailer:smtp}</option>
    <option value="b5" requires="config{mailonline:1[AND]mailer:smtp},com_search{show_date:1}">config{mailonline:1[AND]mailer:smtp},com_search{show_date:1}</option>
    <option value="b6" requires="plg_system_p3p">plg_system_p3p</option>
    <option value="b7" requires="plg_system_languagefilter{item_associations:1}">plg_system_languagefilter{item_associations:1}</option>
</field>

<field
    name="test2"
    type="text"
    label="Test 2"
    description="Test 2"
    hint="Test 2"
    requires="config{mailonline:1[AND]mailer:smtp}"
/>

<field
    name="test3"
    type="integer"
    label="Test 3"
    description="Test 3"
    first="1"
    last="10"
    step="1"
    requires="config{mailonline:1[AND]mailer:smtp},com_search{show_date:1}"
/>
  • Check that the options in this list field only are displayed when the requirements are fulfilled.
  • Check the second and third field only exists when the requirements are fulfilled.
  • Make other tests with other requires you can remember.

Documentation Changes Required

Maybe add this to the form fields documentations.

Notes

If merged i will change all existent require attributes to this new form.

@mbabker please review/test.

avatar andrepereiradasilva andrepereiradasilva - open - 22 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 22 Oct 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Oct 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 22 Oct 2016
Category Libraries
avatar andrepereiradasilva andrepereiradasilva - change - 22 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 22 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 22 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 22 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 22 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 22 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 22 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 22 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - edited - 22 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 22 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - change - 22 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 22 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - edited - 22 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 23 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 23 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 23 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 23 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 23 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 23 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 23 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 23 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 23 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 23 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 23 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 23 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - edited - 23 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 23 Oct 2016
Title
More flexible requires attribute in form list options
More flexible requires attribute in form list options (+Extend to form fields)
avatar andrepereiradasilva andrepereiradasilva - change - 23 Oct 2016
Title
More flexible requires attribute in form list options
More flexible requires attribute in form list options (+Extend to form fields)
avatar andrepereiradasilva andrepereiradasilva - edited - 23 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 23 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 23 Oct 2016
45a8333 23 Oct 2016 avatar andrepereiradasilva ups
5331b56 23 Oct 2016 avatar andrepereiradasilva cs
avatar brianteeman brianteeman - change - 29 Oct 2016
Labels Added: ?
Removed: ?
avatar andrepereiradasilva andrepereiradasilva - change - 31 Oct 2016
The description was changed
avatar mbabker
mbabker - comment - 21 May 2017

This PR needs a new owner or it will have to be closed as abandoned.

avatar joomla-cms-bot joomla-cms-bot - change - 21 May 2017
The description was changed
avatar joomla-cms-bot joomla-cms-bot - edited - 21 May 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 22 May 2017
The description was changed
Status Pending Information Required
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Jun 2017

If this PR get no Response, it will be closed at 23th July 2017.

avatar franz-wohlkoenig franz-wohlkoenig - change - 23 Jul 2017
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2017-07-23 08:25:53
Closed_By franz-wohlkoenig
avatar joomla-cms-bot
joomla-cms-bot - comment - 23 Jul 2017
avatar joomla-cms-bot joomla-cms-bot - change - 23 Jul 2017
Closed_Date 2017-07-23 08:25:53 2017-07-23 08:25:54
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 23 Jul 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 23 Jul 2017

closed as stated above.


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

Add a Comment

Login with GitHub to post a comment