source: trunk/services/templates/login_form.ihtml @ 763

Last change on this file since 763 was 763, checked in by anonymous, 2 years ago

Include boomerang in hidden input on login form so the user will be redirected if the revisit the login form after session is garbage collected. Add escape values used in html attributes.

File size: 1.5 KB
Line 
1<?php
2$autocomplete = $auth->getParam('login_form_allow_autocomplete') ? '' : ' autocomplete="off"';
3?>
4<form method="post" action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" class="sc-form"<?php echo $autocomplete; ?>>
5<?php $app->printHiddenSession(['boomerang']) ?>
6<table>
7    <tr class="sc-form-row">
8        <td class="sc-right"><label for="username"><?php echo _("Username"); ?></label></td>
9        <td>
10            <input type="text" class="sc-small" size="20" name="username" value="<?php echo oTxt($frm['username']); ?>" />
11        </td>
12    </tr>
13    <tr class="sc-form-row">
14        <td class="sc-right"><label for="password"><?php echo _("Password"); ?></label></td>
15        <td>
16            <input type="password" class="sc-small" size="20" name="password" value=""<?php echo $autocomplete; ?> />
17        </td>
18    </tr>
19    <tr class="sc-form-row">
20        <td class="sc-right">&nbsp;</td>
21        <td>
22            <label class="sc-label-secondary"><input type="checkbox" name="remember_me" id="remember_me" value="1"<?php frmChecked($frm['remember_me']) ?> /> <?php echo _("Remember my username"); ?></label>
23        </td>
24    </tr>
25    <tr>
26        <td>&nbsp;</td>
27        <td><input type="submit" value="<?php echo _("Login"); ?>" /></td>
28    </tr>
29</table>
30</form>
31<script type="text/javascript" charset="utf-8">
32/* <![CDATA[ */
33$(document).ready(function() {
34    if ($('input[name="username"]').val() != '') {
35        $('input[name="password"]').focus();
36    } else {
37        $('input[name="username"]').focus();
38    }
39});
40/* ]]> */
41</script>
Note: See TracBrowser for help on using the repository browser.