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("returningtosite") ?></h2>
22 <div class=
"subcontent loginsub">
25 print_string("loginusing");
27 echo '('.get_string("cookiesenabled").')';
28 echo $OUTPUT->help_icon('cookiesenabled');
32 if (!empty($errormsg)) {
33 echo html_writer
::start_tag('div', array('class' => 'loginerrors'));
34 echo html_writer
::link('#', $errormsg, array('id' => 'loginerrormessage', 'class' => 'accesshide'));
35 echo $OUTPUT->error_text($errormsg);
36 echo html_writer
::end_tag('div');
39 <form action=
"<?php echo $CFG->httpswwwroot; ?>/login/index.php" method
="post" id
="login" <?php
echo $autocomplete; ?> >
40 <div class=
"loginform">
41 <div class=
"form-label"><label for=
"username"><?php print_string("username") ?></label></div>
42 <div class=
"form-input">
43 <input type=
"text" name=
"username" id=
"username" size=
"15" value=
"<?php p($frm->username) ?>" />
45 <div
class="clearer"><!-- --></div
>
46 <div
class="form-label"><label
for="password"><?php
print_string("password") ?></label></div>
47 <div class=
"form-input">
48 <input type=
"password" name=
"password" id=
"password" size=
"15" value=
"" <?php echo $autocomplete; ?> />
49 <input type=
"submit" id=
"loginbtn" value=
"<?php print_string("login
") ?>" />
52 <div
class="clearer"><!-- --></div
>
53 <?php
if (isset($CFG->rememberusername
) and $CFG->rememberusername
== 2) { ?>
54 <div class=
"rememberpass">
55 <input type=
"checkbox" name=
"rememberusername" id=
"rememberusername" value=
"1" <?php if ($frm->username
) {echo 'checked="checked"';} ?> />
56 <label for=
"rememberusername"><?php print_string('rememberusername', 'admin') ?></label>
59 <div class=
"clearer"><!-- --></div>
60 <div class=
"forgetpass"><a href=
"forgot_password.php"><?php print_string("forgotten") ?></a></div>
64 <?php if ($CFG->guestloginbutton
and !isguestuser()) { ?>
65 <div class=
"subcontent guestsub">
67 <?php print_string("someallowguest") ?>
69 <form action=
"index.php" method=
"post" id=
"guestlogin">
70 <div class=
"guestform">
71 <input type=
"hidden" name=
"username" value=
"guest" />
72 <input type=
"hidden" name=
"password" value=
"guest" />
73 <input type=
"submit" value=
"<?php print_string("loginguest
") ?>" />
79 <?php if ($show_instructions) { ?>
80 <div class=
"signuppanel">
81 <h2><?php print_string("firsttime") ?></h2>
82 <div class=
"subcontent">
83 <?php if (is_enabled_auth('none')) { // instructions override the rest for security reasons
84 print_string("loginstepsnone");
85 } else if ($CFG->registerauth
== 'email') {
86 if (!empty($CFG->auth_instructions
)) {
87 echo format_text($CFG->auth_instructions
);
89 print_string("loginsteps", "", "signup.php");
91 <div class=
"signupform">
92 <form action=
"signup.php" method=
"get" id=
"signup">
93 <div><input type=
"submit" value=
"<?php print_string("startsignup
") ?>" /></div
>
96 <?php
} else if (!empty($CFG->registerauth
)) {
97 echo format_text($CFG->auth_instructions
); ?>
98 <div class=
"signupform">
99 <form action=
"signup.php" method=
"get" id=
"signup">
100 <div><input type=
"submit" value=
"<?php print_string("startsignup
") ?>" /></div
>
104 echo format_text($CFG->auth_instructions
);
109 <?php if (!empty($potentialidps)) { ?>
110 <div class=
"subcontent potentialidps">
111 <h6><?php print_string('potentialidps', 'auth'); ?></h6>
112 <div class=
"potentialidplist">
113 <?php foreach ($potentialidps as $idp) {
114 echo '<div class="potentialidp"><a href="' . $idp['url']->out() . '" title="' . $idp['name'] . '">' . $OUTPUT->render($idp['icon'], $idp['name']) . $idp['name'] . '</a></div>';