Skip to content

Commit

Permalink
Fixed search filter to have a default label, but to accept others
Browse files Browse the repository at this point in the history
  • Loading branch information
hkdobrev committed Aug 8, 2013
1 parent fbcecfe commit b459ba0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion classes/Kohana/Tart/Filter/Entry/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
*/
abstract class Kohana_Tart_Filter_Entry_Search extends Tart_Filter_Entry {

protected $_label = 'Search';

public function default_callback()
{
return function($collection, $value, $name) {
Expand All @@ -19,6 +21,6 @@ public function default_callback()

public function render()
{
return $this->parent()->form()->row('input', $this->name(), array('label' => 'Search'), array('class' => 'search', 'tabindex' => $this->tabindex()));
return $this->parent()->form()->row('input', $this->name(), array('label' => $this->label()), array('class' => 'search', 'tabindex' => $this->tabindex()));
}
}

0 comments on commit b459ba0

Please sign in to comment.