From 2be3dec52abbddf807cd9e1d83399327ec4911f9 Mon Sep 17 00:00:00 2001 From: wilsonge Date: Mon, 19 Aug 2019 21:48:37 +0100 Subject: [PATCH] Allow editing the form --- .../com_weblinks/tmpl/weblink/edit.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/administrator/components/com_weblinks/tmpl/weblink/edit.php b/src/administrator/components/com_weblinks/tmpl/weblink/edit.php index 5f080d9..3f7e715 100644 --- a/src/administrator/components/com_weblinks/tmpl/weblink/edit.php +++ b/src/administrator/components/com_weblinks/tmpl/weblink/edit.php @@ -22,15 +22,16 @@ $assoc = JLanguageAssociations::isEnabled(); // Fieldsets to not automatically render by /layouts/joomla/edit/params.php $this->ignore_fieldsets = array('details', 'images', 'item_associations', 'jmetadata'); -JFactory::getDocument()->addScriptDeclaration(" - Joomla.submitbutton = function(task) - { - if (task == 'weblink.cancel' || document.formvalidator.isValid(document.getElementById('weblink-form'))) { - " . $this->form->getField('description')->save() . " - Joomla.submitform(task, document.getElementById('weblink-form')); - } - }; -"); +// TODO: Check with Dimtris - I don't believe this is required anymore in combination with the `form-validate` class +//JFactory::getDocument()->addScriptDeclaration(" +// Joomla.submitbutton = function(task) +// { +// if (task == 'weblink.cancel' || document.formvalidator.isValid(document.getElementById('weblink-form'))) { +// " . $this->form->getField('description')->save() . " +// Joomla.submitform(task, document.getElementById('weblink-form')); +// } +// }; +//"); // In case of modal $isModal = $input->get('layout') == 'modal' ? true : false;