Compare commits

...
2 Commits
Author SHA1 Message Date
Wojtek d6635c4499 Show subject field in set form 2026-10-15 16:57:29 +02:00
Wojtek 266deac4c9 Fix subject form actions 2026-10-15 16:55:20 +02:00
6 changed files with 14 additions and 3 deletions
+1 -1
View File
@@ -23,6 +23,6 @@ Szkielet komponentu Joomla 6 do gromadzenia pytań testowych.
## Instalacja ## Instalacja
W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.10.0). W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.10.2).
Po instalacji komponent jest dostępny w panelu administratora jako **Pytania testowe**. Po instalacji komponent jest dostępny w panelu administratora jako **Pytania testowe**.
@@ -0,0 +1 @@
-- No database changes required for version 1.10.1.
@@ -0,0 +1 @@
-- No database changes required for version 1.10.2.
@@ -10,6 +10,7 @@ HTMLHelper::_('behavior.formvalidator');
<form action="<?php echo Route::_('index.php?option=com_testquestions&view=set&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate"> <form action="<?php echo Route::_('index.php?option=com_testquestions&view=set&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate">
<fieldset class="adminform"> <fieldset class="adminform">
<?php echo $this->form->renderField('title'); ?> <?php echo $this->form->renderField('title'); ?>
<?php echo $this->form->renderField('subject_id'); ?>
<?php echo $this->form->renderField('description'); ?> <?php echo $this->form->renderField('description'); ?>
<?php echo $this->form->renderField('published'); ?> <?php echo $this->form->renderField('published'); ?>
<div class="mb-3"> <div class="mb-3">
@@ -1,8 +1,16 @@
<?php defined('_JEXEC') or die; ?> <?php defined('_JEXEC') or die; ?>
<form action="index.php?option=com_testquestions&layout=edit&id=<?php echo (int) $this->item->id; ?>" method="post" name="adminForm" id="subject-form"> <form action="index.php?option=com_testquestions&view=subject&layout=edit&id=<?php echo (int) $this->item->id; ?>" method="post" name="adminForm" id="subject-form" class="form-validate">
<?php echo $this->form->renderField('title'); ?> <?php echo $this->form->renderField('title'); ?>
<?php echo $this->form->renderField('published'); ?> <?php echo $this->form->renderField('published'); ?>
<?php echo $this->form->renderField('id'); ?> <?php echo $this->form->renderField('id'); ?>
<div class="mt-3">
<button type="submit" class="btn btn-primary" onclick="document.querySelector('#subject-form input[name=task]').value='subject.save';">
<?php echo Joomla\CMS\Language\Text::_('JTOOLBAR_SAVE'); ?>
</button>
<a class="btn btn-secondary" href="index.php?option=com_testquestions&view=subjects">
<?php echo Joomla\CMS\Language\Text::_('JTOOLBAR_CANCEL'); ?>
</a>
</div>
<input type="hidden" name="task" value="subject.save"> <input type="hidden" name="task" value="subject.save">
<?php echo Joomla\CMS\HTML\HTMLHelper::_('form.token'); ?> <?php echo Joomla\CMS\HTML\HTMLHelper::_('form.token'); ?>
</form> </form>
+1 -1
View File
@@ -4,7 +4,7 @@
<creationDate>2026-10-14</creationDate> <creationDate>2026-10-14</creationDate>
<author>Komponent</author> <author>Komponent</author>
<license>GNU General Public License version 2 or later</license> <license>GNU General Public License version 2 or later</license>
<version>1.10.0</version> <version>1.10.2</version>
<description>COM_TESTQUESTIONS_DESCRIPTION</description> <description>COM_TESTQUESTIONS_DESCRIPTION</description>
<element>com_testquestions</element> <element>com_testquestions</element>
<namespace path="src">Komponent\Component\Testquestions</namespace> <namespace path="src">Komponent\Component\Testquestions</namespace>