2 if ($show_instructions) {
3 $columns = 'twocolumns';
5 $columns = 'onecolumn';
8 if (!empty($CFG->loginpasswordautocomplete
)) {
9 $autocomplete = 'autocomplete="off"';
13 if (empty($CFG->authloginviaemail
)) {
14 $strusername = get_string('username');
16 $strusername = get_string('usernameemail');
19 <div class=
"loginbox clearfix <?php echo $columns ?>">
20 <div
class="loginpanel">
22 if (($CFG->registerauth
== 'email') ||
!empty($CFG->registerauth
)) { ?>
23 <div class=
"skiplinks"><a class=
"skip" href=
"signup.php"><?php print_string("tocreatenewaccount"); ?></a></div>
26 <h2><?php print_string("login") ?></h2>
27 <div class=
"subcontent loginsub">
29 if (!empty($errormsg)) {
30 echo html_writer
::start_tag('div', array('class' => 'loginerrors'));
31 echo html_writer
::link('#', $errormsg, array('id' => 'loginerrormessage', 'class' => 'accesshide'));
32 echo $OUTPUT->error_text($errormsg);
33 echo html_writer
::end_tag('div');
36 <form action=
"<?php echo $CFG->httpswwwroot; ?>/login/index.php" method
="post" id
="login" <?php
echo $autocomplete; ?> >
37 <div class=
"loginform">
38 <div class=
"form-label"><label for=
"username"><?php echo($strusername) ?></label></div>
39 <div class=
"form-input">
40 <input type=
"text" name=
"username" id=
"username" size=
"15" value=
"<?php p($frm->username) ?>" />
42 <div
class="clearer"><!-- --></div
>
43 <div
class="form-label"><label
for="password"><?php
print_string("password") ?></label></div>
44 <div class=
"form-input">
45 <input type=
"password" name=
"password" id=
"password" size=
"15" value=
"" <?php echo $autocomplete; ?> />
48 <div class=
"clearer"><!-- --></div>
49 <?php if (isset($CFG->rememberusername
) and $CFG->rememberusername
== 2) { ?>
50 <div class=
"rememberpass">
51 <input type=
"checkbox" name=
"rememberusername" id=
"rememberusername" value=
"1" <?php if ($frm->username
) {echo 'checked="checked"';} ?> />
52 <label for=
"rememberusername"><?php print_string('rememberusername', 'admin') ?></label>
55 <div class=
"clearer"><!-- --></div>
56 <input type=
"submit" id=
"loginbtn" value=
"<?php print_string("login
") ?>" />
57 <div
class="forgetpass"><a href
="forgot_password.php"><?php
print_string("forgotten") ?></a></div>
61 echo get_string("cookiesenabled");
62 echo $OUTPUT->help_icon('cookiesenabled');
67 <?php if ($CFG->guestloginbutton
and !isguestuser()) { ?>
68 <div class=
"subcontent guestsub">
70 <?php print_string("someallowguest") ?>
72 <form action=
"index.php" method=
"post" id=
"guestlogin">
73 <div class=
"guestform">
74 <input type=
"hidden" name=
"username" value=
"guest" />
75 <input type=
"hidden" name=
"password" value=
"guest" />
76 <input type=
"submit" value=
"<?php print_string("loginguest
") ?>" />
82 <?php if ($show_instructions) { ?>
83 <div class=
"signuppanel">
84 <h2><?php print_string("firsttime") ?></h2>
85 <div class=
"subcontent">
86 <?php if (is_enabled_auth('none')) { // instructions override the rest for security reasons
87 print_string("loginstepsnone");
88 } else if ($CFG->registerauth
== 'email') {
89 if (!empty($CFG->auth_instructions
)) {
90 echo format_text($CFG->auth_instructions
);
92 print_string("loginsteps", "", "signup.php");
94 <div class=
"signupform">
95 <form action=
"signup.php" method=
"get" id=
"signup">
96 <div><input type=
"submit" value=
"<?php print_string("startsignup
") ?>" /></div
>
99 <?php
} else if (!empty($CFG->registerauth
)) {
100 echo format_text($CFG->auth_instructions
); ?>
101 <div class=
"signupform">
102 <form action=
"signup.php" method=
"get" id=
"signup">
103 <div><input type=
"submit" value=
"<?php print_string("startsignup
") ?>" /></div
>
107 echo format_text($CFG->auth_instructions
);
112 <?php if (!empty($potentialidps)) { ?>
113 <div class=
"subcontent potentialidps">
114 <h6><?php print_string('potentialidps', 'auth'); ?></h6>
115 <div class=
"potentialidplist">
116 <?php foreach ($potentialidps as $idp) {
117 echo '<div class="potentialidp"><a href="' . $idp['url']->out() . '" title="' . $idp['name'] . '">' . $OUTPUT->render($idp['icon'], $idp['name']) . $idp['name'] . '</a></div>';