<commit_before>@using System.Web.Mvc.Html
@using ClientDependency.Core.Mvc
@using Umbraco.Web
@using HRI.Controllers
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage

@{
    @*
        You can specify a custom member type alias in the constructor, the default is 'Member'    
        for example, to use 'Custom Member' you'd use this syntax:
    
        var registerModel = Members.CreateRegistrationModel("Custom Member");
    *@
    
    var registerModel = Members.CreateRegistrationModel();
    registerModel.RedirectUrl = "for-members/verify-account/";
    
    @*
        Configurable here:           
    
        registerModel.RedirectUrl       - Optional. What path to redirect to if registration is successful. 
                                          By default the member will be redirected to the current umbraco page 
                                          unless this is specified.
    
        registerModel.UsernameIsEmail   - the default is true
                                          if you want the username to be different from the email
                                          address, set this to true and add a new Username field in
                                          the form below
    
                                          @Html.LabelFor(m => registerModel.Username)
                                          @Html.TextBoxFor(m => registerModel.Username)
                                          @Html.ValidationMessageFor(m => registerModel.Username)
    *@
  
    Html.EnableClientValidation();
    Html.EnableUnobtrusiveJavaScript();
    Html.RequiresJs("/umbraco_client/ui/jquery.js");
    Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.min.js");
    Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js");
    
    var success = TempData["FormSuccess"] != null;
    var ssn = registerModel.MemberProperties.Where(p => p.Alias == "ssn").FirstOrDefault();
    var firstName = registerModel.MemberProperties.Where(p => p.Alias == "firstName").FirstOrDefault();
    var lastName = registerModel.MemberProperties.Where(p => p.Alias == "lastName").FirstOrDefault();
    var zipCode = registerModel.MemberProperties.Where(p => p.Alias == "zipCode").FirstOrDefault();
    var phoneNumber = registerModel.MemberProperties.Where(p => p.Alias == "phoneNumber").FirstOrDefault();
}

<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.1.min.js"></script>

@if (success) 
{ 
    @* This message will show if RedirectOnSucces is set to false (default) *@
    <p>Registration succeeeded.</p>
}
else
{
    using (Html.BeginUmbracoForm<RegisterSurfaceController>("HandleRegisterMember"))
    {

        @Html.ValidationSummary("registerModel", true)

        <div class="row-fluid block group">
            <div class="span5 desc"><h3>Please enter your information.</h3></div>
            <div class="span7">
                @Html.Label("Social Security Number")
                @Html.EditorFor(m => ssn.Value)
                @Html.HiddenFor(m => ssn.Alias)
                @Html.ValidationMessageFor(m => ssn.Alias)
            </div>
        </div>
        <div class="row-fluid">
            <div class="span3 offset5">
                @Html.Label("First Name")
                @Html.EditorFor(m => firstName.Value)
                @Html.HiddenFor(m => firstName.Alias)
                @Html.ValidationMessageFor(m => firstName.Alias)
            </div>
            <div class="span3">
                @Html.Label("Last Name")
                @Html.EditorFor(m => lastName.Value)
                @Html.HiddenFor(m => lastName.Alias)
                @Html.ValidationMessageFor(m => lastName.Alias)
            </div>
        </div>
        <div class="row-fluid">
            <div class="span7 offset5">
                @Html.Label("Email")
                @Html.TextBoxFor(m => registerModel.Email)<commit_msg>Fixed SSN model binding on registration page<commit_after>@using System.Web.Mvc.Html
@using ClientDependency.Core.Mvc
@using Umbraco.Web
@using HRI.Controllers
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage

@{
    @*
        You can specify a custom member type alias in the constructor, the default is 'Member'    
        for example, to use 'Custom Member' you'd use this syntax:
    
        var registerModel = Members.CreateRegistrationModel("Custom Member");
    *@
    
    var registerModel = Members.CreateRegistrationModel();
    registerModel.RedirectUrl = "for-members/verify-account/";
    
    @*
        Configurable here:           
    
        registerModel.RedirectUrl       - Optional. What path to redirect to if registration is successful. 
                                          By default the member will be redirected to the current umbraco page 
                                          unless this is specified.
    
        registerModel.UsernameIsEmail   - the default is true
                                          if you want the username to be different from the email
                                          address, set this to true and add a new Username field in
                                          the form below
    
                                          @Html.LabelFor(m => registerModel.Username)
                                          @Html.TextBoxFor(m => registerModel.Username)
                                          @Html.ValidationMessageFor(m => registerModel.Username)
    *@
  
    Html.EnableClientValidation();
    Html.EnableUnobtrusiveJavaScript();
    Html.RequiresJs("/umbraco_client/ui/jquery.js");
    Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.min.js");
    Html.RequiresJs("/umbraco_client/Application/JQuery/jquery.validate.unobtrusive.min.js");

    var success = TempData["FormSuccess"] != null;
    var firstName = registerModel.MemberProperties.Where(p => p.Alias == "firstName").FirstOrDefault();
    var lastName = registerModel.MemberProperties.Where(p => p.Alias == "lastName").FirstOrDefault();
    var zipCode = registerModel.MemberProperties.Where(p => p.Alias == "zipCode").FirstOrDefault();
    var phoneNumber = registerModel.MemberProperties.Where(p => p.Alias == "phoneNumber").FirstOrDefault();
}

<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.1.min.js"></script>

@if (success) 
{ 
    @* This message will show if RedirectOnSucces is set to false (default) *@
    <p>Registration succeeeded.</p>
}
else
{
    using (Html.BeginUmbracoForm<RegisterSurfaceController>("HandleRegisterMember"))
    {

        @Html.ValidationSummary("registerModel", true)

        <div class="row-fluid block group">
            <div class="span5 desc"><h3>Please enter your information.</h3></div>
            <div class="span7">
                @Html.Label("Social Security Number")
                @Html.EditorFor(m => registerModel.MemberProperties.Where(p=>p.Alias == "ssn").FirstOrDefault().Value)
                @Html.HiddenFor(m => registerModel.MemberProperties.Where(p => p.Alias == "ssn").FirstOrDefault().Alias)
                @Html.ValidationMessageFor(m => registerModel.MemberProperties.Where(p => p.Alias == "ssn").FirstOrDefault().Alias)
            </div>
        </div>
        <div class="row-fluid">
            <div class="span3 offset5">
                @Html.Label("<NAME>")
                @Html.EditorFor(m => firstName.Value)
                @Html.HiddenFor(m => firstName.Alias)
                @Html.ValidationMessageFor(m => firstName.Alias)
            </div>
            <div class="span3">
                @Html.Label("<NAME>")
                @Html.EditorFor(m => lastName.Value)
                @Html.HiddenFor(m => lastName.Alias)
                @Html.ValidationMessageFor(m => lastName.Alias)
            </div>
        </div>
        <div class="row-fluid">
            <div class="span7 offset5">
                @Html.Label("Email")
                @Html.TextBoxFor(m => registerModel.Email)
{'fraction_non_alphanumeric': 0.11387811287698661, 'fraction_numerical': 0.003003378801151295, 'mean_word_length': 2.0632426216941355, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 85, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 32, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3860170', 'n_tokens_mistral': 2106, 'n_tokens_neox': 2053, 'n_words': 451}