Beispiel #1
0
    /**
     * Get form for filter
     * @param array $arr_for_select
     * @param string $label
     * @return string
     */
    public static function filter(array $arr_for_select, $label = '')
    {
        $id = Request::get('id');
        if ($label) {
            $label = '<label class="control-label">' . HTML::chars($label) . ':</label> ';
        }
        return '
			<div class="pull-right">
				<form action="" method="post" id="filter_by" accept-charset="utf-8" class="form-inline">
					<div class="form-group">
						' . $label . TB_Form::select_tree('id', $arr_for_select, $id ? $id : 0, ['class' => 'form-control']) . '
					</div>
				</form>
			</div>
		';
    }