MDL-30376 mod_glossary: Integration tidy up
[moodle.git] / login / index_form.html
blob9d2616527a08ca8b4c66bee0ed67f14dc68dcabd
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 echo '<br/>';
21 echo '('.get_string("cookiesenabled").')';
22 echo $OUTPUT->help_icon('cookiesenabled');
24 </div>
25 <?php
26 if (!empty($errormsg)) {
27 echo '<div class="loginerrors">';
28 echo $OUTPUT->error_text($errormsg);
29 echo '</div>';
32 <form action="<?php echo $CFG->httpswwwroot; ?>/login/index.php" method="post" id="login">
33 <div class="loginform">
34 <div class="form-label"><label for="username"><?php print_string("username") ?></label></div>
35 <div class="form-input">
36 <input type="text" name="username" id="username" size="15" value="<?php p($frm->username) ?>" />
37 </div>
38 <div class="clearer"><!-- --></div>
39 <div class="form-label"><label for="password"><?php print_string("password") ?></label></div>
40 <div class="form-input">
41 <input type="password" name="password" id="password" size="15" value="" />
42 <input type="submit" id="loginbtn" value="<?php print_string("login") ?>" />
43 </div>
44 <div class="clearer"><!-- --></div>
45 <?php if (isset($CFG->rememberusername) and $CFG->rememberusername == 2) { ?>
46 <div class="form-label"><input type="checkbox" name="rememberusername" id="rememberusername" value="1" <?php if ($frm->username) {echo 'checked="checked"';} ?> /></div>
47 <div class="form-input"><label for="rememberusername"><?php print_string('rememberusername', 'admin') ?></label></div>
48 <?php } ?>
49 </div>
50 <div class="clearer"><!-- --></div>
51 <div class="forgetpass"><a href="forgot_password.php"><?php print_string("forgotten") ?></a></div>
52 </form>
53 </div>
55 <?php if ($CFG->guestloginbutton and !isguestuser()) { ?>
56 <div class="subcontent guestsub">
57 <div class="desc">
58 <?php print_string("someallowguest") ?>
59 </div>
60 <form action="index.php" method="post" id="guestlogin">
61 <div class="guestform">
62 <input type="hidden" name="username" value="guest" />
63 <input type="hidden" name="password" value="guest" />
64 <input type="submit" value="<?php print_string("loginguest") ?>" />
65 </div>
66 </form>
67 </div>
68 <?php } ?>
69 </div>
70 <?php if ($show_instructions) { ?>
71 <div class="signuppanel">
72 <h2><?php print_string("firsttime") ?></h2>
73 <div class="subcontent">
74 <?php if (is_enabled_auth('none')) { // instructions override the rest for security reasons
75 print_string("loginstepsnone");
76 } else if ($CFG->registerauth == 'email') {
77 if (!empty($CFG->auth_instructions)) {
78 echo format_text($CFG->auth_instructions);
79 } else {
80 print_string("loginsteps", "", "signup.php");
81 } ?>
82 <div class="signupform">
83 <form action="signup.php" method="get" id="signup">
84 <div><input type="submit" value="<?php print_string("startsignup") ?>" /></div>
85 </form>
86 </div>
87 <?php } else if (!empty($CFG->registerauth)) {
88 echo format_text($CFG->auth_instructions); ?>
89 <div class="signupform">
90 <form action="signup.php" method="get" id="signup">
91 <div><input type="submit" value="<?php print_string("startsignup") ?>" /></div>
92 </form>
93 </div>
94 <?php } else {
95 echo format_text($CFG->auth_instructions);
96 } ?>
97 </div>
98 </div>
99 <?php } ?>
100 <?php if (!empty($potentialidps)) { ?>
101 <div class="subcontent potentialidps">
102 <h6><?php print_string('potentialidps', 'auth'); ?></h6>
103 <div class="potentialidplist">
104 <?php foreach ($potentialidps as $idp) {
105 echo '<div class="potentialidp"><a href="' . $idp['url']->out() . '" title="' . $idp['name'] . '">' . $OUTPUT->render($idp['icon'], $idp['name']) . '&nbsp;' . $idp['name'] . '</a></div>';
106 } ?>
107 </div>
108 </div>
109 <?php } ?>
110 </div>