User tests: Successful: Unsuccessful:
I noticed that the layout of the modal-select form field declares the $onchange option, but does not use it. This PR fixes that. I'm not sure if this is a new feature or a bugfix, since it fixes a broken behavior, but could also be judged as a new feature? I created it for 5.1 for now.
Edit a filter form like administrator/components/com_content/forms/filter_articles.xml
and add a modal select field here. One example would be the following:
<field
name="test"
type="article"
label="COM_CONTENT_FIELD_SELECT_ARTICLE_LABEL"
required="true"
select="true"
new="true"
edit="true"
clear="true"
onchange="this.form.submit();"
/>
(You have to add addfieldprefix="Joomla\Component\Content\Administrator\Field"
to the <fieldset>
of that XML, too.)
Go to the article list view in the backend and select an article from the modal.
Article is selected, nothing happens otherwise.
Article is selected, the filter form is submitted and the page is reloading. (Since there is no filter for this on the server side, the request doesn't change anything, but the onchange event is properly fired.)
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Layout |
Sure, but as long as we have this option everywhere else, we should also keep it consistent.
I have tested this item ✅ successfully on 992cc09
I have tested this item ✅ successfully on 992cc09
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
NPM Resource Changed
PR-5.1-dev
|
RTC
Labels |
Added:
RTC
bug
|
Labels |
Removed:
NPM Resource Changed
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-07-03 13:27:36 |
Closed_By | ⇒ | bembelimen |
We should not use inline javascript anymore