COM-FSM
Template:MindTouch > Reports > Controls > SearchInput

SearchInput

Page last modified 14:15, 31 Oct 2010 by Admin
    Table of contents
    No headers
    /**
     * Search Input Control
     *
     * @param uri $uri - base uri for submitting queries (default: page.uri)
     * @param map $params - query params to preserve
     * @param str $key - query param for the query (default: "query")
     * @param $default - default search query
     */
    var uri = $uri ?? page.uri;
    var params = $params ?? {};
    var queryKey = $key ?? "query";
    var query = __request.args[queryKey] ?? $default;
       
    <form class="mt-search-input" method="get" action=(uri)>
        foreach (var paramName:paramValue in params where paramName != queryKey) {
            <input type="hidden" name=(paramName) value=(paramValue) />
        }
        <label for=(@query)>wiki.localize("MindTouch.Reports.search.label")</label>
        <input class="query" id=(@query) type="text" name=(queryKey) value=(query) />
        <input class="search" type="submit" value=(wiki.localize("MindTouch.Reports.search.button")) />
        wiki.localize("MindTouch.Reports.search.learn");
    </form>
    
    
    Powered by MindTouch Core