{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    Competency filter template.

    Classes required for JS:
    * learningplanstats

    Context variables required for this template:
    * contextpageid
    * iscmcompetencygradingenabled
}}
<form class="mform" id="statstFilter" accept-charset="utf-8" method="post" autocomplete="off">
    <fieldset id="id_displayinfo" class="clearfix collapsible">
        <legend class="ftoggler">
            <a href="#" class="fheader" role="button" aria-controls="id_displayinfo" aria-expanded="true">{{#str}}filter, report_lpmonitoring{{/str}}</a>
        </legend>
        <div class="fcontainer clearfix">
            <div class="templatefilter">
                <div class="fitem form-group row">
                    <div class="fitemtitle col-md-3">
                        <label for="templateSelectorStats">{{#str}}template, tool_lp{{/str}}</label>
                    </div>
                    <div class="felement fautocomplete templatelist col-md-9 form-inline">
                        <select id="templateSelectorStats" class="form-control" data-contextid="{{contextpageid}}">
                        </select>
                    </div>
                </div>
                <div class="fitem form-group row">
                    <div class="fitemtitle col-md-3" id="ratingtargetbytemplate">
                        <label>{{#str}}ratings, rating{{/str}}</label>
                    </div>
                    <div class="felement scalefilteroptions col-md-9 form-inline">
                        <div class="scalefiltercontainer">
                                <div class="radio radio-primary">
                                    <span>
                                        <input checked="true" type="radio" name="ratingoptions" id="ratinginplanoption" value="0" aria-labelledby="ratingtargetbytemplate">
                                        <label for="ratinginplanoption">{{#str}}finalrating, report_lpmonitoring{{/str}}</label>
                                    </span>
                                </div>
                                <div class="radio radio-primary">
                                    <span>
                                        <input type="radio" name="ratingoptions" id="ratingincourseoption" value="1" aria-labelledby="ratingtargetbytemplate">
                                        <label for="ratingincourseoption">{{#str}}finalratingcourse, report_lpmonitoring{{/str}}</label>
                                    </span>
                                </div>
                                {{#iscmcompetencygradingenabled}}
                                    <div class="radio radio-primary">
                                        <span>
                                            <input type="radio" name="ratingoptions" id="ratingincoursemoduleoption" value="1" aria-labelledby="ratingtargetbytemplate">
                                            <label for="ratingincoursemoduleoption">{{#str}}finalratingcoursemodule, report_lpmonitoring{{/str}}</label>
                                        </span>
                                    </div>
                                {{/iscmcompetencygradingenabled}}
                        </div>
                    </div>
                </div>
            </div>
            <div class="fitem form-group row">
                    <div class="fitemtitle col-md-3"></div>
                    <div class="felement col-md-9">
                        <button id="submitFilterStatstButton" type="submit" class="btn btn-primary" disabled>
                            {{#str}}apply, report_lpmonitoring{{/str}}
                            <i class="fa fa-refresh fa-spin"></i>
                        </button>
                    </div>
            </div>
        </div>
    </fieldset>
</form>
