{{!
    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/>.
}}
{{!
    @template mod_lti/cartridge_registration_form

    This template provides the layout for the external tool configuration page in the
    LTI module.

    Classes required for JS:
    * lead
    * centered-menu
    * well
    * form-horizontal
    * text-center

    Data attributes required for JS:
    * none

    Context variables required for this template:
    *

}}
<div class="centered-menu">
    <div class="well">
        <form id="cartridge-registration-form" class="form-horizontal">
            <p class="lead text-center">{{#str}} enterkeyandsecret, mod_lti {{/str}}</p>
            <p class="text-center">{{#str}} leaveblank, mod_lti {{/str}}</p>
            <div class="control-group">
                <label class="control-label" for="registration-key">{{#str}} resourcekey_admin, mod_lti {{/str}}</label>
                <div class="controls">
                    <input name="tool-key"
                        class="input-block-level"
                        type="text"
                        id="registration-key">
                </div>
            </div>
            <div class="control-group">
                <label class="control-label" for="registration-secret">{{#str}} password_admin, mod_lti {{/str}}</label>
                <div class="controls">
                    <input name="tool-secret"
                        class="input-block-level"
                        type="text"
                        id="registration-secret">
                </div>
            </div>
            <div class="control-group">
                <div class="controls">
                    <button id="cartridge-registration-submit" type="submit" class="btn btn-success">
                        <span class="btn-text">{{#str}} savechanges {{/str}}</span>
                        <div class="btn-loader">
                            {{> mod_lti/loader }}
                        </div>
                    </button>
                    <button id="cartridge-registration-cancel" type="button" class="btn">
                        <span class="btn-text">{{#str}} cancel {{/str}}</span>
                        <div class="btn-loader">
                            {{> mod_lti/loader }}
                        </div>
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>
{{#js}}
    require(['mod_lti/cartridge_registration_form'], function(registration) {
        registration.init();
    });
{{/js}}
