Skip to content

Commit

Permalink
#11
Browse files Browse the repository at this point in the history
  • Loading branch information
christianbarkowsky committed Aug 22, 2023
1 parent 029a526 commit 839d412
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 41 deletions.
19 changes: 8 additions & 11 deletions contao/dca/tl_form_field.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,10 @@

use Contao\Controller;

/*
* Load tl_content
*/

Controller::loadDataContainer('tl_content');

/*
* Palettes
*/
$GLOBALS['TL_DCA']['tl_form_field']['palettes']['checkbox_extended'] = '{type_legend},type,name,label;{options_legend},checkbox_extended_value;{extended_checkbox_legend},checkbox_extended_url,checkbox_extended_target,checkbox_extended_singleSRC,checkbox_extended_title,checkbox_extended_embed;{fconfig_legend:hide},mandatory;{template_legend:hide},checkbox_extended_tpl;{expert_legend:hide},class;{submit_legend:hide},addSubmit';

/*
* Fields
*/
$GLOBALS['TL_DCA']['tl_form_field']['fields']['checkbox_extended_value'] = [
'label' => &$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_value'],
'exclude' => true,
Expand All @@ -41,7 +31,14 @@
'exclude' => true,
'search' => true,
'inputType' => 'text',
'eval' => ['mandatory' => false, 'rgxp' => 'url', 'decodeEntities' => true, 'maxlength' => 255, 'tl_class' => 'w50 wizard', 'dcaPicker' => true],
'eval' => [
'mandatory' => false,
'rgxp' => 'url',
'decodeEntities' => true,
'maxlength' => 255,
'tl_class' => 'w50 wizard',
'dcaPicker' => true
],
'sql' => "varchar(255) NOT NULL default ''",
];

Expand Down
3 changes: 0 additions & 3 deletions contao/languages/de/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,4 @@
* @link https://github.com/plenta/
*/

/*
* Frontend form fields
*/
$GLOBALS['TL_LANG']['FFL']['checkbox_extended'] = ['Erweiterte Checkbox', ''];
36 changes: 24 additions & 12 deletions contao/languages/de/tl_form_field.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,32 @@
* @link https://github.com/plenta/
*/

/*
* Fields
*/
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_value'] = ['Wert', 'Hier können Sie einen Wert eingeben.'];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_title'] = ['Link-Text', 'Der Link-Text wird anstelle der Link-Adresse angezeigt.'];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_embed'] = ['Den Link einbetten', 'Verwenden Sie den Platzhalter "%s", um den Link in einen Text einzubetten (z.B. <em>Für mehr Informationen besuchen Sie %s</em>).'];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_url'] = ['Link-Adresse', 'Geben Sie eine Web-Adresse (http://…), eine E-Mail-Adresse (mailto:…) oder ein Insert-Tag ein.'];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_target'] = ['In neuem Fenster öffnen', 'Den Link in einem neuen Browserfenster öffnen.'];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_singleSRC'] = ['Quelldatei', 'Bitte wählen Sie eine Datei oder einen Ordner aus der Dateiübersicht.'];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_tpl'] = ['Checkbox-Template', 'Hier können Sie das Checkbox-Template auswählen.'];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_title'] = [
'Link-Text',
'Der Link-Text wird anstelle der Link-Adresse angezeigt.'
];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_embed'] = [
'Den Link einbetten',
'Verwenden Sie den Platzhalter "%s", um den Link in einen Text einzubetten (z.B. <em>Für mehr Informationen besuchen Sie %s</em>).
'];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_url'] = [
'Link-Adresse',
'Geben Sie eine Web-Adresse (http://…), eine E-Mail-Adresse (mailto:…) oder ein Insert-Tag ein.'
];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_target'] = [
'In neuem Fenster öffnen',
'Den Link in einem neuen Browserfenster öffnen.'
];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_singleSRC'] = [
'Quelldatei',
'Bitte wählen Sie eine Datei oder einen Ordner aus der Dateiübersicht.'
];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_tpl'] = [
'Checkbox-Template',
'Hier können Sie das Checkbox-Template auswählen.'
];

/*
* Legends
*/
$GLOBALS['TL_LANG']['tl_form_field']['extended_checkbox_legend'] = 'Erweiterte-Checkbox-Einstellungen';
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_legend'] = 'Hyperlink-Einstellungen';
$GLOBALS['TL_LANG']['tl_form_field']['template_legend'] = 'Template-Einstellungen';
3 changes: 0 additions & 3 deletions contao/languages/en/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,4 @@
* @link https://github.com/plenta/
*/

/*
* Frontend form fields
*/
$GLOBALS['TL_LANG']['FFL']['checkbox_extended'] = ['Extended Checkbox', ''];
36 changes: 24 additions & 12 deletions contao/languages/en/tl_form_field.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,32 @@
* @link https://github.com/plenta/
*/

/*
* Fields
*/
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_value'] = ['Value', 'Please enter the value'];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_title'] = ['Link title', 'The link title will be displayed instead of the target URL.'];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_embed'] = ['Embed the link', 'Use the wildcard "%s" to embed the link in a phrase (e.g. <em>For more information please visit %s</em>).'];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_url'] = ['Link target', 'Please enter a web address (http://…), an e-mail address (mailto:…) or an insert tag.'];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_target'] = ['In neuem Fenster öffnen', 'Den Link in einem neuen Browserfenster öffnen.'];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_singleSRC'] = ['Source file', 'Please select a file or folder from the files directory.'];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_tpl'] = ['Checkbox template', 'Here you can select the form template.'];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_title'] = [
'Link title',
'The link title will be displayed instead of the target URL.'
];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_embed'] = [
'Embed the link',
'Use the wildcard "%s" to embed the link in a phrase (e.g. <em>For more information please visit %s</em>).'
];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_url'] = [
'Link target',
'Please enter a web address (http://…), an e-mail address (mailto:…) or an insert tag.'
];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_target'] = [
'In neuem Fenster öffnen',
'Den Link in einem neuen Browserfenster öffnen.'
];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_singleSRC'] = [
'Source file',
'Please select a file or folder from the files directory.'
];
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_tpl'] = [
'Checkbox template',
'Here you can select the form template.'
];

/*
* Legends
*/
$GLOBALS['TL_LANG']['tl_form_field']['extended_checkbox_legend'] = 'Extended checkbox settings';
$GLOBALS['TL_LANG']['tl_form_field']['checkbox_extended_legend'] = 'Hyperlink-Settings';
$GLOBALS['TL_LANG']['tl_form_field']['template_legend'] = 'Template settings';

0 comments on commit 839d412

Please sign in to comment.