From 03728ce49f038cb52e827ec6f13719a041f934a8 Mon Sep 17 00:00:00 2001 From: Wojtek Date: Fri, 16 Oct 2026 12:20:49 +0200 Subject: [PATCH] Add AI key visibility toggle --- README.md | 2 +- .../components/com_testquestions/config.xml | 2 +- .../sql/updates/mysql/1.42.5.sql | 1 + .../src/Field/AiapikeyField.php | 37 +++++++++++++++++++ com_testquestions.xml | 2 +- 5 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 administrator/components/com_testquestions/sql/updates/mysql/1.42.5.sql create mode 100644 administrator/components/com_testquestions/src/Field/AiapikeyField.php diff --git a/README.md b/README.md index c672fbf..a12dd7a 100644 --- a/README.md +++ b/README.md @@ -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.42.4). +W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.42.5). Po instalacji komponent jest dostępny w panelu administratora jako **Pytania testowe**. diff --git a/administrator/components/com_testquestions/config.xml b/administrator/components/com_testquestions/config.xml index c2d229d..cb3f55c 100644 --- a/administrator/components/com_testquestions/config.xml +++ b/administrator/components/com_testquestions/config.xml @@ -6,7 +6,7 @@ - + diff --git a/administrator/components/com_testquestions/sql/updates/mysql/1.42.5.sql b/administrator/components/com_testquestions/sql/updates/mysql/1.42.5.sql new file mode 100644 index 0000000..36983bd --- /dev/null +++ b/administrator/components/com_testquestions/sql/updates/mysql/1.42.5.sql @@ -0,0 +1 @@ +-- No database changes required for version 1.42.5. diff --git a/administrator/components/com_testquestions/src/Field/AiapikeyField.php b/administrator/components/com_testquestions/src/Field/AiapikeyField.php new file mode 100644 index 0000000..5341060 --- /dev/null +++ b/administrator/components/com_testquestions/src/Field/AiapikeyField.php @@ -0,0 +1,37 @@ +id, ENT_QUOTES, 'UTF-8'); + $name = htmlspecialchars($this->name, ENT_QUOTES, 'UTF-8'); + $value = htmlspecialchars((string) $this->value, ENT_QUOTES, 'UTF-8'); + $length = mb_strlen((string) $this->value); + + return '
' + . '' + . '' + . '
' + . 'Zapisany klucz: ' . (int) $length . ' znaków.' + . ''; + } +} diff --git a/com_testquestions.xml b/com_testquestions.xml index d2f9a6b..ea0150f 100644 --- a/com_testquestions.xml +++ b/com_testquestions.xml @@ -4,7 +4,7 @@ 2026-10-14 Komponent GNU General Public License version 2 or later - 1.42.4 + 1.42.5 COM_TESTQUESTIONS_DESCRIPTION com_testquestions Komponent\Component\Testquestions