migrated signup.php over to using new formslib
[moodle.git] / login / index_form.html
CommitLineData
7b27ce2c 1<table width="90%" border="0" cellpadding="5" align="center" class="loginbox">
2<?php if ($show_instructions) { ?>
3 <tr>
4 <th width="50%" class="header left">
5 <?php print_string("returningtosite") ?>
6 </th>
7 <th width="50%" class="header right">
8 <?php print_string("firsttime") ?>
9 </th>
10 </tr>
11<?php } ?>
12 <tr>
13 <td width="50%" align="center" valign="top" class="content left">
fd78420b 14 <p><?php print_string("loginusing") ?>:
15 <?php
16 if (empty($CFG->usesid))
17 {
18 echo "<br />(";
19 print_string("cookiesenabled");
20 echo ")";
21 helpbutton("cookies", get_string("cookiesenabled"));
22 }
23 ?><br /><?php formerr($errormsg) ?>
7b27ce2c 24 </p>
25 <form action="index.php" method="post" name="login" id="login">
26 <table border="0" align="center">
27 <tr>
28 <td width="80%">
29 <table align="center" class="loginform">
30 <tr class="username">
31 <td align="right" class="c0">
32 <?php print_string("username") ?>:
33 </td>
34 <td class="c1">
35 <input type="text" name="username" size="15" value="<?php p($frm->username) ?>" alt="<?php print_string("username") ?>" />
36 </td>
37 </tr>
38 <tr class="password">
39 <td align="right" class="c0">
40 <?php print_string("password") ?>:
41 </td>
42 <td class="c1">
43 <input type="password" name="password" size="15" value="" alt="<?php print_string("password") ?>" />
44 </td>
45 </tr>
46 </table>
47 </td>
48 <td width="20%">
49 <input type="submit" value="<?php print_string("login") ?>" />
2cc14e87 50 <input type="hidden" name="testcookies" value="1" />
7b27ce2c 51 </td>
52 </tr>
53 </table>
54 </form>
55
56<?php if ($CFG->guestloginbutton) { ?>
57 <hr width="80%" />
58 <p><?php print_string("someallowguest") ?>:</p>
59 <form action="index.php" method="post" name="guestlogin">
60 <input type="hidden" name="username" value="guest" />
61 <input type="hidden" name="password" value="guest" />
2cc14e87 62 <input type="hidden" name="testcookies" value="1" />
7b27ce2c 63 <input type="submit" value="<?php print_string("loginguest") ?>" />
64 </form>
65<?php } ?>
66
36058432 67<?php
68 $changebuttonname = get_string("passwordrecovery");
69 $sesskey = sesskey();
7b27ce2c 70?>
71 <hr width="80%" />
72 <p><?php print_string("forgotten") ?></p>
36058432 73 <form action="forgot_password.php" method="post" name="changepassword">
74 <input type="hidden" name="sesskey" value="<?php echo $sesskey; ?>" />
7b27ce2c 75 <input type="submit" value="<?php p($changebuttonname) ?>" />
76 </form>
7b27ce2c 77 </td>
78
79<?php if ($show_instructions) { ?>
80 <td width="50%" valign="top" class="content right">
81<?php switch ($CFG->auth) {
82 case "email":
83 print_string("loginsteps", "", "signup.php");
84?>
85 <div align="center">
86 <form action="signup.php" method="get" name="signup">
87 <input type="submit" value="<?php print_string("startsignup") ?>" />
88 </form>
89 </div>
90<?php break;
91 case "none":
92 print_string("loginstepsnone");
93 break;
94 default:
95 echo format_text($CFG->auth_instructions);
96 if (!function_exists('auth_user_login')) {
97 require_once("../auth/$CFG->auth/lib.php");
98 }
99 if (!empty($CFG->auth_user_create) and function_exists('auth_user_create') ){
100?>
101 <div align="center">
102 <form action="signup.php" method="get" name="signup">
103 <input type="submit" value="<?php print_string("startsignup") ?>" />
104 </form>
105 </div>
106<?php }
107 }
108?>
109 </td></tr>
110<?php } ?>
111</table>