Skip to content

Commit

Permalink
Fixed labels and increased Contao minimum version to 4.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Toflar committed Dec 1, 2021
1 parent c10b49e commit e403e45
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 0 additions & 6 deletions dca/tl_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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',
Expand All @@ -32,15 +28,13 @@
];

$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],
'sql' => "varchar(255) NOT NULL default ''"
];

$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],
Expand Down
3 changes: 0 additions & 3 deletions dca/tl_form_field.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,20 @@
$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],
'sql' => "varchar(255) NOT NULL default ''"
];

$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],
'sql' => "varchar(255) NOT NULL default ''"
];

$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],
Expand Down
2 changes: 2 additions & 0 deletions languages/de/tl_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.'];
2 changes: 2 additions & 0 deletions languages/en/tl_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.'];
2 changes: 2 additions & 0 deletions languages/ja/tl_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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の断片(例えば、アンカーのリンク)を入力できます。"#"とすると省略できます。'];

0 comments on commit e403e45

Please # to comment.