first shot at reworking plugin system
[diogenes.git] / templates / login.tpl
... / ...
CommitLineData
1<script type="text/javascript" src="{$md5}"></script>
2{literal}
3<script type="text/javascript">
4<!--
5 function doChallengeResponse() {
6 str = document.getElementById('main_login').value + ":" +
7 MD5(document.getElementById('main_password').value) + ":" +
8 document.getElementById('sub_challenge').value;
9
10 document.getElementById('sub_response').value = MD5(str);
11 document.getElementById('sub_login').value = document.getElementById('main_login').value;
12 document.getElementById('main_password').value = "";
13 document.getElementById('sub_form').submit();
14 }
15// -->
16</script>
17{/literal}
18
19<form method="post" action="{$post}" onsubmit="doChallengeResponse(); return false;">
20<table class="light">
21<tr>
22 <th colspan="2">{$msg_connexion}</th>
23</tr>
24<tr>
25 <td>{$msg_username}</td>
26 <td><input type="text" id="main_login" name="login" value="{$username}" /></td>
27</tr>
28<tr>
29 <td>{$msg_password}</td>
30 <td><input type="password" id="main_password" name="password" /></td>
31</tr>
32<tr>
33 <td>&nbsp;</td>
34 <td><input type="submit" value="{$msg_submit}"/></td>
35</tr>
36</table>
37</form>
38
39 <!-- Set up the form with the challenge value and an empty reply value //-->
40<form method="post" action="{$post}" id="sub_form">
41 <input type="hidden" id="sub_challenge" name="challenge" value="{$challenge}" />
42 <input type="hidden" id="sub_response" name="response" value="" />
43 <input type="hidden" id="sub_login" name="login" value="" />
44</form>
45
46<script type="text/javascript">
47<!--
48 // Activate the appropriate input form field.
49{if $username}
50{literal}
51 document.loginmain.password.focus();
52{/literal}
53{else}
54{literal}
55 document.loginmain.login.focus();
56{/literal}
57{/if}
58// -->
59</script>