32
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2025-01-13 08:11:57 +00:00

Allow editing the form

This commit is contained in:
wilsonge 2019-08-19 21:48:37 +01:00
parent 828325e86c
commit 2be3dec52a
No known key found for this signature in database
GPG Key ID: EF81319318FC9D04

View File

@ -22,15 +22,16 @@ $assoc = JLanguageAssociations::isEnabled();
// Fieldsets to not automatically render by /layouts/joomla/edit/params.php // Fieldsets to not automatically render by /layouts/joomla/edit/params.php
$this->ignore_fieldsets = array('details', 'images', 'item_associations', 'jmetadata'); $this->ignore_fieldsets = array('details', 'images', 'item_associations', 'jmetadata');
JFactory::getDocument()->addScriptDeclaration(" // TODO: Check with Dimtris - I don't believe this is required anymore in combination with the `form-validate` class
Joomla.submitbutton = function(task) //JFactory::getDocument()->addScriptDeclaration("
{ // Joomla.submitbutton = function(task)
if (task == 'weblink.cancel' || document.formvalidator.isValid(document.getElementById('weblink-form'))) { // {
" . $this->form->getField('description')->save() . " // if (task == 'weblink.cancel' || document.formvalidator.isValid(document.getElementById('weblink-form'))) {
Joomla.submitform(task, document.getElementById('weblink-form')); // " . $this->form->getField('description')->save() . "
} // Joomla.submitform(task, document.getElementById('weblink-form'));
}; // }
"); // };
//");
// In case of modal // In case of modal
$isModal = $input->get('layout') == 'modal' ? true : false; $isModal = $input->get('layout') == 'modal' ? true : false;