Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .check-author.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ mapping:
- "cboelter <christopher@boelter.eu>"
- "Christopher Boelter <c.boelter@cogizz.de>"
"Martin Treml <github@r2pi.net>": "MrTool <github@r2pi.net>"
"Ingolf Steinhardt <info@e-spin.de>":
- "xantippe <info@e-spin.de>"
- "zonky2 <info@e-spin.de>"

copy-left:
"Christoph Wiechert <christoph.wiechert@4wardmedia.de>": popup.php
3 changes: 2 additions & 1 deletion contao/config/database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
--

CREATE TABLE `tl_metamodel_filtersetting` (
`textsearch` varchar(32) NOT NULL default ''
`textsearch` varchar(32) NOT NULL default '',
`placeholder` varchar(255) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
11 changes: 10 additions & 1 deletion contao/dca/tl_metamodel_filtersetting.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
* @author Christian Schiffler <c.schiffler@cyberspectrum.de>
* @author David Molineus <mail@netzmacht.de>
* @author Christopher Boelter <christopher@boelter.eu>
* @author Ingolf Steinhardt <info@e-spin.de>
* @copyright The MetaModels team.
* @license LGPL.
* @filesource
*/

$GLOBALS['TL_DCA']['tl_metamodel_filtersetting']['metapalettes']['text extends default'] = array
(
'+config' => array('attr_id', 'urlparam', 'label', 'template', 'textsearch'),
'+config' => array('attr_id', 'urlparam', 'label', 'template', 'textsearch', 'placeholder'),
);

$GLOBALS['TL_DCA']['tl_metamodel_filtersetting']['fields']['textsearch'] = array
Expand All @@ -34,3 +35,11 @@
'reference' => $GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['references'],
'eval' => array('tl_class' => 'w50', 'includeBlankOption' => true)
);

$GLOBALS['TL_DCA']['tl_metamodel_filtersetting']['fields']['placeholder'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['placeholder'],
'exclude' => true,
'inputType' => 'text',
'eval' => array('tl_class' => 'w50')
);
2 changes: 2 additions & 0 deletions contao/languages/en/tl_metamodel_filtersetting.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* @package MetaModels
* @subpackage FilterText
* @author Christian de la Haye <service@delahaye.de>
* @author Ingolf Steinhardt <info@e-spin.de>
* @copyright The MetaModels team.
* @license LGPL.
* @filesource
Expand All @@ -25,6 +26,7 @@
* fields
*/
$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['textsearch'] = array('Search type', 'Finding text parts.');
$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['placeholder'] = array('Placeholder', 'Show this text as long as the field is empty (requires HTML5).');


/**
Expand Down
10 changes: 6 additions & 4 deletions src/MetaModels/Filter/Setting/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* @author David Maack <david.maack@arcor.de>
* @author Stefan Heimes <stefan_heimes@hotmail.com>
* @author Christopher Boelter <christopher@boelter.eu>
* @author Ingolf Steinhardt <info@e-spin.de>
* @copyright The MetaModels team.
* @license LGPL.
* @filesource
Expand Down Expand Up @@ -120,7 +121,7 @@ public function getParameterFilterWidgets(
$arrReturn = array();
$this->addFilterParam($this->getParamName());

// Address search.
// Text search.
$arrCount = array();
$arrWidget = array(
'label' => array(
Expand All @@ -131,9 +132,10 @@ public function getParameterFilterWidgets(
'count' => $arrCount,
'showCount' => $objFrontendFilterOptions->isShowCountValues(),
'eval' => array(
'colname' => $attribute->getColname(),
'urlparam' => $this->getParamName(),
'template' => $this->get('template'),
'colname' => $attribute->getColname(),
'urlparam' => $this->getParamName(),
'template' => $this->get('template'),
'placeholder' => $this->get('placeholder'),
)
);

Expand Down