示例#1
0
function smarty_function_display_errors($args, &$smarty)
{
    $inc_fields = isset($args['inc_fields']) ? $args['inc_fields'] : false;
    if (Pfw_Alert::hasError()) {
        $errors = Pfw_Alert::getErrors($in);
        $list = "<ul class=\"pfw-alert pfw-error\">\n";
        foreach ($errors as $error) {
            $list .= "<li>{$error}</li>\n";
        }
        $list .= "</ul>";
        return $list;
    }
    return "";
}