Adding plugin abstract class and adding a step to activities to generate their module.xml
[moodle.git] / login / index_form.html
blobcd9f8a4bc5dce44816eea8c2e53bf0ef1564c7d8
1 <?php
2 if ($show_instructions) {
3 $columns = 'twocolumns';
4 } else {
5 $columns = 'onecolumn';
7 ?>
8 <div class="loginbox clearfix <?php echo $columns ?>">
9 <div class="loginpanel">
10 <?php
11 if (($CFG->registerauth == 'email') || !empty($CFG->registerauth)) { ?>
12 <div class="skiplinks"><a class="skip" href="signup.php"><?php print_string("tocreatenewaccount"); ?></a></div>
13 <?php
14 } ?>
15 <h2><?php print_string("returningtosite") ?></h2>
16 <div class="subcontent loginsub">
17 <div class="desc">
18 <?php
19 print_string("loginusing");
20 if (empty($CFG->usesid)) {
21 echo '<br/>';
22 echo '('.get_string("cookiesenabled").')';
23 echo $OUTPUT->help_icon('cookiesenabled');
26 </div>
27 <?php
28 if (!empty($errormsg)) {
29 echo '<div class="loginerrors">';
30 echo $OUTPUT->error_text($errormsg);
31 echo '</div>';
34 <form action="<?php echo $CFG->httpswwwroot; ?>/login/index.php" method="post" id="login">
35 <div class="loginform">
36 <div class="form-label"><label for="username"><?php print_string("username") ?></label></div>
37 <div class="form-input">
38 <input type="text" name="username" id="username" size="15" value="<?php p($frm->username) ?>" />
39 </div>
40 <div class="clearer"><!-- --></div>
41 <div class="form-label"><label for="password"><?php print_string("password") ?></label></div>
42 <div class="form-input">
43 <input type="password" name="password" id="password" size="15" value="" />
44 <input type="submit" id="loginbtn" value="<?php print_string("login") ?>" />
45 <div class="forgetpass"><a href="forgot_password.php"><?php print_string("forgotten") ?></a></div>
46 </div>
47 <div class="clearer"><!-- --></div>
48 </div>
49 </form>
50 </div>
52 <?php if ($CFG->guestloginbutton and !isguestuser()) { ?>
53 <div class="subcontent guestsub">
54 <div class="desc">
55 <?php print_string("someallowguest") ?>
56 </div>
57 <form action="index.php" method="post" id="guestlogin">
58 <div class="guestform">
59 <input type="hidden" name="username" value="guest" />
60 <input type="hidden" name="password" value="guest" />
61 <input type="submit" value="<?php print_string("loginguest") ?>" />
62 </div>
63 </form>
64 </div>
65 <?php } ?>
66 </div>
67 <?php if ($show_instructions) { ?>
68 <div class="signuppanel">
69 <h2><?php print_string("firsttime") ?></h2>
70 <div class="subcontent">
71 <?php if (is_enabled_auth('none')) { // instructions override the rest for security reasons
72 print_string("loginstepsnone");
73 } else if ($CFG->registerauth == 'email') {
74 if (!empty($CFG->auth_instructions)) {
75 echo format_text($CFG->auth_instructions);
76 } else {
77 print_string("loginsteps", "", "signup.php");
78 } ?>
79 <div class="signupform">
80 <form action="signup.php" method="get" id="signup">
81 <div><input type="submit" value="<?php print_string("startsignup") ?>" /></div>
82 </form>
83 </div>
84 <?php } else if (!empty($CFG->registerauth)) {
85 echo format_text($CFG->auth_instructions); ?>
86 <div class="signupform">
87 <form action="signup.php" method="get" id="signup">
88 <div><input type="submit" value="<?php print_string("startsignup") ?>" /></div>
89 </form>
90 </div>
91 <?php } else {
92 echo format_text($CFG->auth_instructions);
93 } ?>
94 </div>
95 </div>
96 <?php } ?>
97 <?php if (!empty($potentialidps)) { ?>
98 <div class="subcontent potentialidps">
99 <h6><?php print_string('potentialidps', 'auth'); ?></h6>
100 <div class="potentialidplist">
101 <?php foreach ($potentialidps as $idp) {
102 echo '<div class="potentialidp"><a href="' . $idp['url']->out() . '" title="' . $idp['name'] . '">' . $OUTPUT->render($idp['icon'], $idp['name']) . '&nbsp;' . $idp['name'] . '</a></div>';
103 } ?>
104 </div>
105 </div>
106 <?php } ?>
107 </div>