PageRenderTime 23ms CodeModel.GetById 16ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/AnotherStartup/Account/Login.cshtml

#
Razor | 45 lines | 42 code | 2 blank | 1 comment | 0 complexity | 2c3fca1133d3a7c1fe371004df24515a MD5 | raw file
 1@{this.Init(layout:"~/_SiteLayout.cshtml", title:"Log In", action:Account.Login.Init);}
 2<p>
 3   Please enter your username and password below. If you don't have an account,
 4   visit the <a href="@Href("~/Account/Register")">registration page</a> and create one.
 5</p>
 6
 7@* If one or more validation errors exist, show an error *@
 8@if (!Page.IsValid) {
 9   <p class="message error">There was a problem with your login and/or errors exist in your form.</p>
10}
11
12<form method="post" action="">
13    <fieldset>
14        <legend>Log In to Your Account</legend>
15        <ol>            
16            <li class="username">
17                <label for="username">Email:</label>
18                <input type="text" id="username" name="username" value="@Page.Model.Username" title="Username" @if(Page.Errors.Username.IsError){<text>class="error-field"</text>} />                
19                @if (Page.Errors.Username.IsError)
20                {
21                <label for="username" class="validation-error">
22                    @Page.Errors.Username.Message;
23                </label>
24                }
25            </li>            
26            <li class="password">
27                <label for="password">Password:</label>
28                <input type="password" id="password" name="password" title="Password" @if (Page.Errors.Password.IsError){<text>class="error-field"</text>} />                
29                @if (Page.Errors.Password.IsError){
30                <label for="password" class="validation-error">
31                    @Page.Errors.Password.Message;
32                </label>
33                }
34            </li>
35            <li class="remember-me">
36                <label class="checkbox" for="rememberMe">Remember Me?</label>
37                <input type="checkbox" id="rememberMe" name="rememberMe" value="true" title="Remember Me" @if(Page.Model.RememberMe){<text>checked="checked"</text>} />
38            </li>
39        </ol>
40        <p class="form-actions">
41            <input type="submit" value="login" title="Login"/>
42        </p>
43        <p><a href="@Href("~/Account/ForgotPassword")">Did you forget your password?</a></p>
44    </fieldset>
45</form>