2 if ($show_instructions) {
3 $columns = 'twocolumns';
5 $columns = 'onecolumn';
8 if (!empty($CFG->loginpasswordautocomplete
)) {
9 $autocomplete = 'autocomplete="off"';
14 <div class=
"loginbox clearfix <?php echo $columns ?>">
15 <div
class="loginpanel">
17 if (($CFG->registerauth
== 'email') ||
!empty($CFG->registerauth
)) { ?>
18 <div class=
"skiplinks"><a class=
"skip" href=
"signup.php"><?php print_string("tocreatenewaccount"); ?></a></div>
21 <h2><?php print_string("login") ?></h2>
22 <div class=
"subcontent loginsub">
24 if (!empty($errormsg)) {
25 echo html_writer
::start_tag('div', array('class' => 'loginerrors'));
26 echo html_writer
::link('#', $errormsg, array('id' => 'loginerrormessage', 'class' => 'accesshide'));
27 echo $OUTPUT->error_text($errormsg);
28 echo html_writer
::end_tag('div');
31 <form action=
"<?php echo $CFG->httpswwwroot; ?>/login/index.php" method
="post" id
="login" <?php
echo $autocomplete; ?> >
32 <div class=
"loginform">
33 <div class=
"form-label"><label for=
"username"><?php print_string("username") ?></label></div>
34 <div class=
"form-input">
35 <input type=
"text" name=
"username" id=
"username" size=
"15" value=
"<?php p($frm->username) ?>" />
37 <div
class="clearer"><!-- --></div
>
38 <div
class="form-label"><label
for="password"><?php
print_string("password") ?></label></div>
39 <div class=
"form-input">
40 <input type=
"password" name=
"password" id=
"password" size=
"15" value=
"" <?php echo $autocomplete; ?> />
41 <input type=
"submit" id=
"loginbtn" value=
"<?php print_string("login
") ?>" />
44 <div
class="clearer"><!-- --></div
>
45 <?php
if (isset($CFG->rememberusername
) and $CFG->rememberusername
== 2) { ?>
46 <div class=
"rememberpass">
47 <input type=
"checkbox" name=
"rememberusername" id=
"rememberusername" value=
"1" <?php if ($frm->username
) {echo 'checked="checked"';} ?> />
48 <label for=
"rememberusername"><?php print_string('rememberusername', 'admin') ?></label>
51 <div class=
"clearer"><!-- --></div>
52 <div class=
"forgetpass"><a href=
"forgot_password.php"><?php print_string("forgotten") ?></a></div>
56 echo get_string("cookiesenabled");
57 echo $OUTPUT->help_icon('cookiesenabled');
62 <?php if ($CFG->guestloginbutton
and !isguestuser()) { ?>
63 <div class=
"subcontent guestsub">
65 <?php print_string("someallowguest") ?>
67 <form action=
"index.php" method=
"post" id=
"guestlogin">
68 <div class=
"guestform">
69 <input type=
"hidden" name=
"username" value=
"guest" />
70 <input type=
"hidden" name=
"password" value=
"guest" />
71 <input type=
"submit" value=
"<?php print_string("loginguest
") ?>" />
77 <?php if ($show_instructions) { ?>
78 <div class=
"signuppanel">
79 <h2><?php print_string("firsttime") ?></h2>
80 <div class=
"subcontent">
81 <?php if (is_enabled_auth('none')) { // instructions override the rest for security reasons
82 print_string("loginstepsnone");
83 } else if ($CFG->registerauth
== 'email') {
84 if (!empty($CFG->auth_instructions
)) {
85 echo format_text($CFG->auth_instructions
);
87 print_string("loginsteps", "", "signup.php");
89 <div class=
"signupform">
90 <form action=
"signup.php" method=
"get" id=
"signup">
91 <div><input type=
"submit" value=
"<?php print_string("startsignup
") ?>" /></div
>
94 <?php
} else if (!empty($CFG->registerauth
)) {
95 echo format_text($CFG->auth_instructions
); ?>
96 <div class=
"signupform">
97 <form action=
"signup.php" method=
"get" id=
"signup">
98 <div><input type=
"submit" value=
"<?php print_string("startsignup
") ?>" /></div
>
102 echo format_text($CFG->auth_instructions
);
107 <?php if (!empty($potentialidps)) { ?>
108 <div class=
"subcontent potentialidps">
109 <h6><?php print_string('potentialidps', 'auth'); ?></h6>
110 <div class=
"potentialidplist">
111 <?php foreach ($potentialidps as $idp) {
112 echo '<div class="potentialidp"><a href="' . $idp['url']->out() . '" title="' . $idp['name'] . '">' . $OUTPUT->render($idp['icon'], $idp['name']) . $idp['name'] . '</a></div>';