Skip to content

Commit

Permalink
Fix data truncated error for visibleArea settings, #82
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed Mar 23, 2023
1 parent 29a6254 commit 17401d2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Resources/contao/dca/tl_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -478,13 +478,15 @@
'exclude' => true,
'inputType' => 'text',
'eval' => array('tl_class' => 'w50 clr'),
'save_callback' => [function($value) { return (float) $value; }],
'sql' => "double unsigned NOT NULL default '0'",
);
$GLOBALS['TL_DCA']['tl_content']['fields']['rsts_thumbs_visibleAreaMax'] = array(
'label' => &$GLOBALS['TL_LANG']['tl_module']['rsts_visibleAreaMax'],
'exclude' => true,
'inputType' => 'text',
'eval' => array('tl_class' => 'w50'),
'save_callback' => [function($value) { return (float) $value; }],
'sql' => "double unsigned NOT NULL default '0'",
);
$GLOBALS['TL_DCA']['tl_content']['fields']['rsts_thumbs_slideMinSize'] = array(
Expand Down Expand Up @@ -547,6 +549,7 @@
'exclude' => true,
'inputType' => 'text',
'eval' => array('tl_class' => 'w50 clr'),
'save_callback' => [function($value) { return (float) $value; }],
'sql' => "double unsigned NOT NULL default '0'",
);
// maximum size of the area for the visible slide in px
Expand All @@ -555,6 +558,7 @@
'exclude' => true,
'inputType' => 'text',
'eval' => array('tl_class' => 'w50'),
'save_callback' => [function($value) { return (float) $value; }],
'sql' => "double unsigned NOT NULL default '0'",
);
// Alignment of the visible area (0 = start, 0.5 = center, 1 = end)
Expand Down
4 changes: 4 additions & 0 deletions src/Resources/contao/dca/tl_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -478,13 +478,15 @@
'exclude' => true,
'inputType' => 'text',
'eval' => array('tl_class' => 'w50 clr'),
'save_callback' => [function($value) { return (float) $value; }],
'sql' => "double unsigned NOT NULL default '0'",
);
$GLOBALS['TL_DCA']['tl_module']['fields']['rsts_thumbs_visibleAreaMax'] = array(
'label' => &$GLOBALS['TL_LANG']['tl_module']['rsts_visibleAreaMax'],
'exclude' => true,
'inputType' => 'text',
'eval' => array('tl_class' => 'w50'),
'save_callback' => [function($value) { return (float) $value; }],
'sql' => "double unsigned NOT NULL default '0'",
);
$GLOBALS['TL_DCA']['tl_module']['fields']['rsts_thumbs_slideMinSize'] = array(
Expand Down Expand Up @@ -547,6 +549,7 @@
'exclude' => true,
'inputType' => 'text',
'eval' => array('tl_class' => 'w50 clr'),
'save_callback' => [function($value) { return (float) $value; }],
'sql' => "double unsigned NOT NULL default '0'",
);
// maximum size of the area for the visible slide in px
Expand All @@ -555,6 +558,7 @@
'exclude' => true,
'inputType' => 'text',
'eval' => array('tl_class' => 'w50'),
'save_callback' => [function($value) { return (float) $value; }],
'sql' => "double unsigned NOT NULL default '0'",
);
// Alignment of the visible area (0 = start, 0.5 = center, 1 = end)
Expand Down

0 comments on commit 17401d2

Please sign in to comment.