login_form

NAML documentation   Watch a video
   Usages of this macro
... in login.naml
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<macro name="login_form">
    <n.put_in_head
Binary
Namespace: HtmlNamespace
Parameters: in_head
.>
        <style type="text/css">
            input[type=text],input[type=password] {
                padding:.4em 0;
            }
            div.field-title {
                margin:.1em .3em 0 1.5em;
                white-space:nowrap;
                text-align:right;
            }
        </style>
    </n.put_in_head.>
    <n.form
Macro
Requires: servlet
Parameters: macro, method, onsubmit, content
. macro="login_page">
        <n.message_field
Macro
Parameters: do
.hidden
Macro
Requires: field
/>
        <n.nextUrl_field
Macro
Parameters: do
.hidden
Macro
Requires: field
/>
        <table>
            <tr>
                <td>
                    <div class="second-font field-title">
                        <t>Email</t>
                    </div>
                </td>
                <td><n.email_field
Macro
Parameters: do
.input
Macro
Requires: field
Parameters: size, maxlength, tabindex, type
 type="text" size="40" /> <div class="weak-color" style="display:inline;font-size:80%"><t>Example: johnsmith@domain.com</t></div></td>
            </tr>
            <tr>
                <td>
                    <div class="second-font field-title">
                        <t>Password</t>
                    </div>
                </td>
                <td><n.password_field
Macro
Parameters: do
.input
Macro
Requires: field
Parameters: size, maxlength, tabindex, type
 type="password" size="20" /></td>
            </tr>
            <tr>
                <td align="right" style="padding-right:.3em"><img src="/images/lock.png" width="30" height="46"/></td>
                <td>
                    <input type="submit" value="[t]Login[/t]" />
                    <div style="padding-top:.2em"><a href="[n.forgot_password_path
Macro
/]"><t>Forgot your password?</t></a></div>
                </td>
            </tr>
        </table>
    </n.form.>
</macro>