PageRenderTime 15ms CodeModel.GetById 12ms app.highlight 0ms RepoModel.GetById 2ms app.codeStats 0ms

/AnotherStartup/Account/Register.cshtml

#
Razor | 59 lines | 52 code | 2 blank | 5 comment | 2 complexity | dc6bd6e3de3e61a52f23bdc76fb46c88 MD5 | raw file
 1@{this.Init(layout: "~/_SiteLayout.cshtml", title: "Register an Account", action: Account.Register.Init);}
 2<p>
 3   Use the form below to create a new account. 
 4</p>
 5
 6@* If at least one validation error exists, notify the user *@
 7@if (!Page.IsValid) {
 8   <p class="message error">
 9    @if (Page.Errors.AccountCreation.IsError) {
10        @Page.Errors.AccountCreation.Message;
11    } else {
12        @:Please correct the errors and try again.
13    }
14   </p>
15}
16
17<form method="post" action="">
18    <fieldset>
19        <legend>Sign-up Form</legend>
20        <ol>
21            <li class="email">
22                <label for="email">Email:</label>
23                <input type="text" id="email" name="email" title="Email address" value="@Page.Model.Email" @if(Page.Errors.Email.IsError){<text>class="error-field"</text>} />                
24                @if (Page.Errors.Email.IsError) {
25                    <label for="email" class="validation-error">@Page.Errors.Email.Message</label>
26                }
27            </li>
28            <li class="password">
29                <label for="password">Password:</label>
30                <input type="password" id="password" name="password" title="Password" @if(Page.Errors.Password.IsError){<text>class="error-field"</text>} />                
31                @if (Page.Errors.Password.IsError) {
32                    <label for="password" class="validation-error">@Page.Errors.Password.Message</label>
33                }
34            </li>
35            <li class="confirm-password">
36                <label for="confirmPassword">Confirm Password:</label>
37                <input type="password" id="confirmPassword" name="confirmPassword" title="Confirm password" @if(Page.Errors.ConfirmPassword.IsError){<text>class="error-field"</text>} />                
38                @if (Page.Errors.ConfirmPassword.IsError) {
39                    <label for="confirmPassword" class="validation-error">@Page.Errors.ConfirmPassword.Message</label>
40                }
41            </li>
42            <li class="recaptcha">
43                <div class="message info">
44                    <p>To enable CAPTCHA verification, <a href="http://go.microsoft.com/fwlink/?LinkId=204140">install the ASP.NET Web Helpers Library</a> and uncomment ReCaptcha.GetHtml and replace 'PUBLIC_KEY'
45                    with your public key.  At the top of this page, uncomment ReCaptcha.Validate and
46                    replace 'PRIVATE_KEY' with your private key, and also uncomment the captchaMessage variable.</p>
47                    <p>Register for reCAPTCHA keys at <a href="http://recaptcha.net">reCAPTCHA.net</a>.</p>
48                </div>
49                @*@ReCaptcha.GetHtml("PUBLIC_KEY", theme: "white")
50                @if (Page.Errors.Captcha.IsError) {
51                    <label class="validation-error">Page.Errors.Captcha.Message</label>
52                }*@
53            </li>
54        </ol>
55        <p class="form-actions">
56            <input type="submit" value="Register" title="Register" />
57        </p>
58    </fieldset>
59</form>