MDL-52154 mod_lti: Improve admin interface
[moodle.git] / mod / lti / templates / cartridge_registration_form.mustache
CommitLineData
cc193e0d
RW
1{{!
2 This file is part of Moodle - http://moodle.org/
3
4 Moodle is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 Moodle is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with Moodle. If not, see <http://www.gnu.org/licenses/>.
16}}
17{{!
18 @template mod_lti/cartridge_registration_form
19
20 This template provides the layout for the external tool configuration page in the
21 LTI module.
22
23 Classes required for JS:
24 * none
25
26 Data attributes required for JS:
27 * none
28
29 Context variables required for this template:
30 *
31
32 Example context (json):
33 {
34 }
35
36}}
37<div class="centered-menu">
38 <div class="well">
39 <form id="cartridge-registration-form" class="form-horizontal">
40 <p class="lead text-center">Enter your consumer key and shared secret</p>
41 <p class="text-center">or leave blank if you don't need them</p>
42 <div class="control-group">
43 <label class="control-label" for="registration-key">Consumer Key</label>
44 <div class="controls">
45 <input name="tool-key"
46 class="input-block-level"
47 type="text"
48 id="registration-key">
49 </div>
50 </div>
51 <div class="control-group">
52 <label class="control-label" for="registration-secret">Shared Secret</label>
53 <div class="controls">
54 <input name="tool-secret"
55 class="input-block-level"
56 type="text"
57 id="registration-secret">
58 </div>
59 </div>
60 <div class="control-group">
61 <div class="controls">
62 <button id="cartridge-registration-submit" type="button" class="btn btn-success">
63 <span class="btn-text">Done</span>
64 <div class="btn-loader">
65 {{> mod_lti/loader }}
66 </div>
67 </button>
68 <button id="cartridge-registration-cancel" type="button" class="btn btn-danger">
69 <span class="btn-text">Cancel</span>
70 <div class="btn-loader">
71 {{> mod_lti/loader }}
72 </div>
73 </button>
74 </div>
75 </div>
76 </form>
77 </div>
78</div>
79{{#js}}
80 require(['mod_lti/cartridge_registration_form'], function(registration) {
81 registration.init();
82 });
83{{/js}}