From e403e452334d83e005b137854fa906249e6dcf32 Mon Sep 17 00:00:00 2001 From: Yanick Witschi Date: Wed, 1 Dec 2021 17:06:49 +0100 Subject: [PATCH] Fixed labels and increased Contao minimum version to 4.9 --- composer.json | 2 +- dca/tl_form.php | 6 ------ dca/tl_form_field.php | 3 --- languages/de/tl_form.php | 2 ++ languages/en/tl_form.php | 2 ++ languages/ja/tl_form.php | 2 ++ 6 files changed, 7 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index 3356ca6..c2467cf 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ ], "require": { "php": "^7.1 || ^8.0", - "contao/core-bundle": "^4.4", + "contao/core-bundle": "^4.9", "contao-community-alliance/composer-plugin": "^2.4 || ^3.0", "codefog/contao-haste": "^4.18", "symfony/var-dumper": "^3.4 || ^4.4 || ^5.0" diff --git a/dca/tl_form.php b/dca/tl_form.php index 0b7b884..affc08a 100644 --- a/dca/tl_form.php +++ b/dca/tl_form.php @@ -12,9 +12,6 @@ /** * Table tl_form */ -$GLOBALS['TL_DCA']['tl_form']['config']['onload_callback'][] = function() { - \Contao\System::loadLanguageFile('tl_form_field'); -}; $GLOBALS['TL_DCA']['tl_form']['config']['onsubmit_callback'][] = function($dc) { $manager = new \MPFormsFormManager((int) $dc->id); $manager->resetData(); @@ -23,7 +20,6 @@ $GLOBALS['TL_DCA']['tl_form']['palettes']['default'] .= ';{mp_forms_legend},mp_forms_getParam,mp_forms_backFragment,mp_forms_nextFragment'; $GLOBALS['TL_DCA']['tl_form']['fields']['mp_forms_getParam'] = [ - 'label' => &$GLOBALS['TL_LANG']['tl_form']['mp_forms_getParam'], 'exclude' => true, 'default' => 'step', 'inputType' => 'text', @@ -32,7 +28,6 @@ ]; $GLOBALS['TL_DCA']['tl_form']['fields']['mp_forms_backFragment'] = [ - 'label' => &$GLOBALS['TL_LANG']['tl_form_field']['mp_forms_backFragment'], 'exclude' => true, 'inputType' => 'text', 'eval' => ['tl_class' => 'w50 clr', 'maxlength' => 255], @@ -40,7 +35,6 @@ ]; $GLOBALS['TL_DCA']['tl_form']['fields']['mp_forms_nextFragment'] = [ - 'label' => &$GLOBALS['TL_LANG']['tl_form_field']['mp_forms_nextFragment'], 'exclude' => true, 'inputType' => 'text', 'eval' => ['tl_class' => 'w50', 'maxlength' => 255], diff --git a/dca/tl_form_field.php b/dca/tl_form_field.php index c938115..b808f8f 100644 --- a/dca/tl_form_field.php +++ b/dca/tl_form_field.php @@ -20,7 +20,6 @@ $GLOBALS['TL_DCA']['tl_form_field']['palettes']['mp_form_placeholder'] = '{type_legend},type;{text_legend},html;{template_legend:hide},customTpl;{invisible_legend:hide},invisible'; $GLOBALS['TL_DCA']['tl_form_field']['fields']['mp_forms_backButton'] = [ - 'label' => &$GLOBALS['TL_LANG']['tl_form_field']['mp_forms_backButton'], 'exclude' => true, 'inputType' => 'text', 'eval' => ['tl_class' => 'w50 clr', 'maxlength' => 255], @@ -28,7 +27,6 @@ ]; $GLOBALS['TL_DCA']['tl_form_field']['fields']['mp_forms_backFragment'] = [ - 'label' => &$GLOBALS['TL_LANG']['tl_form_field']['mp_forms_backFragment'], 'exclude' => true, 'inputType' => 'text', 'eval' => ['tl_class' => 'w50', 'maxlength' => 255], @@ -36,7 +34,6 @@ ]; $GLOBALS['TL_DCA']['tl_form_field']['fields']['mp_forms_nextFragment'] = [ - 'label' => &$GLOBALS['TL_LANG']['tl_form_field']['mp_forms_nextFragment'], 'exclude' => true, 'inputType' => 'text', 'eval' => ['tl_class' => 'w50', 'maxlength' => 255], diff --git a/languages/de/tl_form.php b/languages/de/tl_form.php index c9cc20d..f81f020 100644 --- a/languages/de/tl_form.php +++ b/languages/de/tl_form.php @@ -18,3 +18,5 @@ * Fields */ $GLOBALS['TL_LANG']['tl_form']['mp_forms_getParam'] = ['GET-Parameter', 'Sie können hier optional den verwendeten GET-Parameter umstellen.']; +$GLOBALS['TL_LANG']['tl_form']['mp_forms_backFragment'] = ['URL Fragment für die Zurück-Schaltfläche', 'Hier können Sie ein optionales URL Fragment eingeben, welches der URL hinzugefügt wird (z.B. für Sprunglinks). Lassen Sie "#" weg.']; +$GLOBALS['TL_LANG']['tl_form']['mp_forms_nextFragment'] = ['URL Fragment für die Weiter-Schaltfläche', 'Hier können Sie ein optionales URL Fragment eingeben, welches der URL hinzugefügt wird (z.B. für Sprunglinks). Lassen Sie "#" weg.']; \ No newline at end of file diff --git a/languages/en/tl_form.php b/languages/en/tl_form.php index a3d51a6..8f97301 100644 --- a/languages/en/tl_form.php +++ b/languages/en/tl_form.php @@ -18,3 +18,5 @@ * Fields */ $GLOBALS['TL_LANG']['tl_form']['mp_forms_getParam'] = ['GET parameter', 'You can optionally modify the used GET parameter here.']; +$GLOBALS['TL_LANG']['tl_form_field']['mp_forms_backFragment'] = ['Back button URL fragment', 'You may enter an optional URL fragment here which will be added to the URL when hitting the back button (e.g. for anchor links). Omit the "#" here.']; +$GLOBALS['TL_LANG']['tl_form_field']['mp_forms_nextFragment'] = ['Continue button URL fragment', 'You may enter an optional URL fragment here which will be added to the URL when hitting the continue button (e.g. for anchor links). Omit the "#" here.']; diff --git a/languages/ja/tl_form.php b/languages/ja/tl_form.php index 31150b7..80fb996 100644 --- a/languages/ja/tl_form.php +++ b/languages/ja/tl_form.php @@ -18,3 +18,5 @@ * Fields */ $GLOBALS['TL_LANG']['tl_form']['mp_forms_getParam'] = ['GETパラメーター', 'GETに使用するパラメーターを変更できます。']; +$GLOBALS['TL_LANG']['tl_form']['mp_forms_backFragment'] = ['戻るボタンのURLの断片', '戻るボタンをクリックしたときのURLに付加するURLの断片(例えば、アンカーのリンク)を入力できます。"#"とすると省略できます。']; +$GLOBALS['TL_LANG']['tl_form']['mp_forms_nextFragment'] = ['続けるボタンのURLの断片', '続けるボタンをクリックしたときのURLに付加するURLの断片(例えば、アンカーのリンク)を入力できます。"#"とすると省略できます。'];