User tests: Successful: Unsuccessful:
Pull Request for Issue #43289 .
The PR add a backward compatibility code to handle buttons for bootstrap modal for Plugin/Module editing.
Run npm install
.
Add following code, somewhere, example in to index.php of Admin template:
$pluginId = 100; // Id of any existing plugin
$link = Route::_('index.php?option=com_plugins&client_id=0&task=plugin.edit&extension_id=' . $pluginId . '&tmpl=component&layout=modal');
echo HTMLHelper::_(
'bootstrap.renderModal',
'plugin' . $pluginId . 'Modal',
[
'url' => $link,
'title' => 'Edit',
'height' => '400px',
'width' => '800px',
'bodyHeight' => '70',
'modalWidth' => '80',
'closeButton' => false,
'backdrop' => 'static',
'keyboard' => false,
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"'
. ' onclick="Joomla.iframeButtonClick({iframeSelector: \'#plugin' . $pluginId . 'Modal\', buttonSelector: \'#closeBtn\'})">'
. Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
. '<button type="button" class="btn btn-primary" data-bs-dismiss="modal" onclick="Joomla.iframeButtonClick({iframeSelector: \'#plugin' . $pluginId . 'Modal\', buttonSelector: \'#saveBtn\'})">'
. Text::_("JSAVE") . '</button>'
. '<button type="button" class="btn btn-success" onclick="Joomla.iframeButtonClick({iframeSelector: \'#plugin' . $pluginId . 'Modal\', buttonSelector: \'#applyBtn\'}); return false;">'
. Text::_("JAPPLY") . '</button>'
]
);
echo HTMLHelper::_('link', '#plugin' . $pluginId . 'Modal', 'Click me', 'class="alert-link" data-bs-toggle="modal"');
It will render bootstrap modal, and link that opens it.
Then click this link, and in the opened modal try to edit any field, and use modal's buttons to save .
Nothing happens (when click "save"), modal just closes (when click "close" or "save and close").
The form saved, the modal closes after it.
Please select:
References:
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_modules com_plugins JavaScript Repository NPM Change |
Title |
|
Labels |
Added:
NPM Resource Changed
bug
PR-5.1-dev
|
I have tested this item ✅ successfully on 23f8389
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
RTC
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-05-11 11:54:58 |
Closed_By | ⇒ | LadySolveig |
Thank you @Fedik and for testing @Ruud68 @viocassel
I have tested this item ✅ successfully on 23f8389
Tested with Kunena 6.3, works!
Thanks @Fedik for providing this PR.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43291.