Compare commits

..
1 Commits
Author SHA1 Message Date
Wojtek defdfcb32f Return save and close from variant to parent 2026-10-16 10:28:31 +02:00
4 changed files with 16 additions and 2 deletions
+1 -1
View File
@@ -30,6 +30,6 @@ Szkielet komponentu Joomla 6 do gromadzenia pytań testowych.
## Instalacja
W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.37.0).
W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.37.1).
Po instalacji komponent jest dostępny w panelu administratora jako **Pytania testowe**.
@@ -0,0 +1 @@
-- No database changes required for version 1.37.1.
@@ -17,6 +17,19 @@ class SetController extends FormController
$this->setRedirect('index.php?option=com_testquestions&view=set&layout=edit&parent_id=' . $parentId);
}
public function save2close($key = null, $urlVar = null)
{
$formData = (array) $this->input->post->get('jform', [], 'array');
$parentId = (int) ($formData['parent_id'] ?? 0);
$result = parent::save2close($key, $urlVar);
if ($result && $parentId > 0) {
$this->setRedirect('index.php?option=com_testquestions&task=set.edit&id=' . $parentId);
}
return $result;
}
public function cancel($key = null)
{
$parentId = $this->input->getInt('parent_id');
+1 -1
View File
@@ -4,7 +4,7 @@
<creationDate>2026-10-14</creationDate>
<author>Komponent</author>
<license>GNU General Public License version 2 or later</license>
<version>1.37.0</version>
<version>1.37.1</version>
<description>COM_TESTQUESTIONS_DESCRIPTION</description>
<element>com_testquestions</element>
<namespace path="src">Komponent\Component\Testquestions</namespace>