Skip to content

Commit

Permalink
Merge pull request #3 from hkdobrev/search-label
Browse files Browse the repository at this point in the history
Fixed search filter to have a default label, but to accept others
  • Loading branch information
hkdobrev committed Aug 8, 2013
2 parents 96bbf91 + b459ba0 commit 7e464c4
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 7e464c4

Please sign in to comment.