Skip to content

Commit

Permalink
Add confirmation dialog to deletion button
Browse files Browse the repository at this point in the history
 - This change helps to avoid accidental deletion of YAML files
  • Loading branch information
martialblog committed May 13, 2024
1 parent 473f161 commit 385f931
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions application/forms/EditForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ public function createElements(array $formData)
'ignore' => true,
'label' => $this->translate('Delete config'),
'class' => 'btn-remove',
'onclick' => 'return confirm("' . $this->translate('Confirm deletion') . '")',
'decorators' => array('ViewHelper')
)
);
Expand Down
Binary file modified application/locale/de_DE/LC_MESSAGES/toplevelview.mo
Binary file not shown.
12 changes: 8 additions & 4 deletions application/locale/de_DE/LC_MESSAGES/toplevelview.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ msgstr ""
"Project-Id-Version: Toplevelview Module (0.0.0)\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2017-10-13 11:53+0000\n"
"PO-Revision-Date: 2017-10-13 14:00+0200\n"
"PO-Revision-Date: 2024-04-24 12:51+0200\n"
"Last-Translator: Markus Opolka <[email protected]>\n"
"Language-Team: \n"
"Language: de_DE\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Basepath: .\n"
"Last-Translator: Markus Frosch <[email protected]>\n"
"Language-Team: \n"
"X-Generator: Poedit 1.8.11\n"
"X-Generator: Poedit 3.0.1\n"
"X-Poedit-SearchPath-0: .\n"

#: ../../../../modules/toplevelview/application/views/helpers/Tree.php:58
Expand Down Expand Up @@ -161,3 +161,7 @@ msgstr "Nicht-Gespeicherte Änderungen!"
#: ../../../../modules/toplevelview/application/forms/EditForm.php:120
msgid "YAML Config"
msgstr "YAML Konfiguration"

#: ../../../../modules/toplevelview/application/forms/EditForm.php:173
msgid "Confirm deletion"
msgstr "Löschen bestätigen"

0 comments on commit 385f931

Please sign in to comment.