MDL-34123 use user's lang when sending new emails
[moodle.git] / login / index_form.html
blob1765064cd10e7528120a12a849c6171596c8ef6f
1 <?php
2 if ($show_instructions) {
3 $columns = 'twocolumns';
4 } else {
5 $columns = 'onecolumn';
8 if (empty($CFG->xmlstrictheaders) and !empty($CFG->loginpasswordautocomplete)) {
9 $autocomplete = 'autocomplete="off"';
10 } else {
11 $autocomplete = '';
14 <div class="loginbox clearfix <?php echo $columns ?>">
15 <div class="loginpanel">
16 <?php
17 if (($CFG->registerauth == 'email') || !empty($CFG->registerauth)) { ?>
18 <div class="skiplinks"><a class="skip" href="signup.php"><?php print_string("tocreatenewaccount"); ?></a></div>
19 <?php
20 } ?>
21 <h2><?php print_string("returningtosite") ?></h2>
22 <div class="subcontent loginsub">
23 <div class="desc">
24 <?php
25 print_string("loginusing");
26 echo '<br/>';
27 echo '('.get_string("cookiesenabled").')';
28 echo $OUTPUT->help_icon('cookiesenabled');
30 </div>
31 <?php
32 if (!empty($errormsg)) {
33 echo '<div class="loginerrors">';
34 echo $OUTPUT->error_text($errormsg);
35 echo '</div>';
38 <form action="<?php echo $CFG->httpswwwroot; ?>/login/index.php" method="post" id="login" <?php echo $autocomplete; ?> >
39 <div class="loginform">
40 <div class="form-label"><label for="username"><?php print_string("username") ?></label></div>
41 <div class="form-input">
42 <input type="text" name="username" id="username" size="15" value="<?php p($frm->username) ?>" />
43 </div>
44 <div class="clearer"><!-- --></div>
45 <div class="form-label"><label for="password"><?php print_string("password") ?></label></div>
46 <div class="form-input">
47 <input type="password" name="password" id="password" size="15" value="" <?php echo $autocomplete; ?> />
48 <input type="submit" id="loginbtn" value="<?php print_string("login") ?>" />
49 </div>
50 </div>
51 <div class="clearer"><!-- --></div>
52 <?php if (isset($CFG->rememberusername) and $CFG->rememberusername == 2) { ?>
53 <div class="rememberpass">
54 <input type="checkbox" name="rememberusername" id="rememberusername" value="1" <?php if ($frm->username) {echo 'checked="checked"';} ?> />
55 <label for="rememberusername"><?php print_string('rememberusername', 'admin') ?></label>
56 </div>
57 <?php } ?>
58 <div class="clearer"><!-- --></div>
59 <div class="forgetpass"><a href="forgot_password.php"><?php print_string("forgotten") ?></a></div>
60 </form>
61 </div>
63 <?php if ($CFG->guestloginbutton and !isguestuser()) { ?>
64 <div class="subcontent guestsub">
65 <div class="desc">
66 <?php print_string("someallowguest") ?>
67 </div>
68 <form action="index.php" method="post" id="guestlogin">
69 <div class="guestform">
70 <input type="hidden" name="username" value="guest" />
71 <input type="hidden" name="password" value="guest" />
72 <input type="submit" value="<?php print_string("loginguest") ?>" />
73 </div>
74 </form>
75 </div>
76 <?php } ?>
77 </div>
78 <?php if ($show_instructions) { ?>
79 <div class="signuppanel">
80 <h2><?php print_string("firsttime") ?></h2>
81 <div class="subcontent">
82 <?php if (is_enabled_auth('none')) { // instructions override the rest for security reasons
83 print_string("loginstepsnone");
84 } else if ($CFG->registerauth == 'email') {
85 if (!empty($CFG->auth_instructions)) {
86 echo format_text($CFG->auth_instructions);
87 } else {
88 print_string("loginsteps", "", "signup.php");
89 } ?>
90 <div class="signupform">
91 <form action="signup.php" method="get" id="signup">
92 <div><input type="submit" value="<?php print_string("startsignup") ?>" /></div>
93 </form>
94 </div>
95 <?php } else if (!empty($CFG->registerauth)) {
96 echo format_text($CFG->auth_instructions); ?>
97 <div class="signupform">
98 <form action="signup.php" method="get" id="signup">
99 <div><input type="submit" value="<?php print_string("startsignup") ?>" /></div>
100 </form>
101 </div>
102 <?php } else {
103 echo format_text($CFG->auth_instructions);
104 } ?>
105 </div>
106 </div>
107 <?php } ?>
108 <?php if (!empty($potentialidps)) { ?>
109 <div class="subcontent potentialidps">
110 <h6><?php print_string('potentialidps', 'auth'); ?></h6>
111 <div class="potentialidplist">
112 <?php foreach ($potentialidps as $idp) {
113 echo '<div class="potentialidp"><a href="' . $idp['url']->out() . '" title="' . $idp['name'] . '">' . $OUTPUT->render($idp['icon'], $idp['name']) . '&nbsp;' . $idp['name'] . '</a></div>';
114 } ?>
115 </div>
116 </div>
117 <?php } ?>
118 </div>