Added Valid and enabled Form::select sorting

This commit is contained in:
Deon George
2013-11-27 11:24:47 +11:00
parent 1ec370f07a
commit c132357630
4 changed files with 39 additions and 0 deletions

View File

@@ -81,6 +81,11 @@ abstract class lnApp_Form extends Kohana_Form {
unset($attributes['oneonly']);
}
if (isset($attributes['sort']) AND $attributes['sort']) {
asort($options);
unset($attributes['sort']);
}
return sprintf(static::_controlgroup($name,$attributes),parent::select($name,$options,$selected,$attributes));
}