Advertisement
Guest User

Untitled

a guest
Dec 17th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 5.33 KB | None | 0 0
  1. @model TheGarage.Web.Models.RegisterViewModel
  2.  
  3.  
  4. @using (Html.BeginForm("PersonalRegister", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
  5. {
  6.     @Html.AntiForgeryToken()
  7.     <h4>Create personal account</h4>
  8.     <hr />
  9.     @Html.ValidationSummary("", new { @class = "text-danger" })
  10.     <div class="form-group">
  11.         @Html.LabelFor(m => m.FirstName, new { @class = "col-md-2 control-label" })
  12.         <div class="col-md-10">
  13.             @Html.TextBoxFor(m => m.FirstName, new { @class = "form-control" })
  14.         </div>
  15.     </div>
  16.     <div class="form-group">
  17.         @Html.LabelFor(m => m.LastName, new { @class = "col-md-2 control-label" })
  18.         <div class="col-md-10">
  19.             @Html.TextBoxFor(m => m.LastName, new { @class = "form-control" })
  20.         </div>
  21.     </div>
  22.     <div class="form-group">
  23.         @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" })
  24.         <div class="col-md-10">
  25.             @Html.TextBoxFor(m => m.Email, new { @class = "form-control" })
  26.         </div>
  27.     </div>
  28.     <div class="form-group">
  29.         @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
  30.         <div class="col-md-10">
  31.             @Html.PasswordFor(m => m.Password, new { @class = "form-control" })
  32.         </div>
  33.     </div>
  34.     <div class="form-group">
  35.         @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" })
  36.         <div class="col-md-10">
  37.             @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" })
  38.         </div>
  39.     </div>
  40.  
  41.     <div class="form-group k-content">
  42.         @Html.LabelFor(m => m.States, new { @class = "col-md-2 control-label" })
  43.         <div class="col-md-10">
  44.             @(Html.Kendo().DropDownList()
  45.               .Name("statesP")
  46.               .OptionLabel("Select state...")
  47.               .DataTextField("Name")
  48.               .DataValueField("Id")
  49.               .DataSource(source =>
  50.               {
  51.                   source.Read(read =>
  52.                   {
  53.                       read.Action("GetCascadeState", "Account");
  54.                   });
  55.               })
  56.             )
  57.         </div>
  58.     </div>
  59.  
  60.     <div class="form-group">
  61.         @Html.LabelFor(m => m.Cities, new { @class = "col-md-2 control-label" })
  62.         <div class="col-md-10">
  63.             @(Html.Kendo().DropDownList()
  64.               .Name("citiesP")
  65.               .OptionLabel("Select city...")
  66.               .DataTextField("Name")
  67.               .DataValueField("Id")
  68.               .DataSource(source =>
  69.               {
  70.                   source.Read(read =>
  71.                   {
  72.                       read.Action("GetCascadeCities", "Account")
  73.                           .Data("filterCitiesP");
  74.                   })
  75.                   .ServerFiltering(true);
  76.               })
  77.               .Enable(false)
  78.               .AutoBind(false)
  79.               .CascadeFrom("statesP")
  80.             )
  81.  
  82.         </div>
  83.     </div>
  84.  
  85.     <div class="form-group">
  86.         @Html.LabelFor(m => m.Garages, new { @class = "col-md-2 control-label" })
  87.         <div class="col-md-10">
  88.             @(Html.Kendo().DropDownList()
  89.               .Name("garagesP")
  90.               .OptionLabel("Select garage...")
  91.               .DataTextField("Name")
  92.               .DataValueField("Id")
  93.               .DataSource(source =>
  94.               {
  95.                   source.Read(read =>
  96.                   {
  97.                       read.Action("GetCascadeGarages", "Account")
  98.                           .Data("filterGaragesP");
  99.                   })
  100.                   .ServerFiltering(true);
  101.               })
  102.               .Enable(false)
  103.               .AutoBind(false)
  104.               .CascadeFrom("citiesP")
  105.             )
  106.  
  107.         </div>
  108.     </div>
  109.     <div class="form-group">
  110.         @Html.LabelFor(m => m.RequestDate, new { @class = "col-md-2 control-label" })
  111.         <div class="col-md-10">
  112.             @Html.TextBoxFor(m => m.RequestDate, new { @class = "form-control" })
  113.         </div>
  114.     </div>
  115.     <div class="form-group">
  116.         @Html.LabelFor(m => m.PlacesCount, new { @class = "col-md-2 control-label" })
  117.         <div class="col-md-10">
  118.             @Html.TextBoxFor(m => m.PlacesCount, new { @class = "form-control" })
  119.         </div>
  120.     </div>
  121.     <div class="form-group">
  122.         @Html.LabelFor(m => m.PhoneNumber, new { @class = "col-md-2 control-label" })
  123.         <div class="col-md-10">
  124.             @Html.TextBoxFor(m => m.PhoneNumber, new { @class = "form-control" })
  125.         </div>
  126.     </div>
  127.  
  128.     <div class="form-group">
  129.         <div class="col-md-offset-2 col-md-10">
  130.             <input type="submit" class="btn btn-default" value="Register" />
  131.         </div>
  132.     </div>
  133. }
  134.  
  135.  
  136.  
  137. @*<script>
  138.     $(document).ready(function () {
  139.         var states = $("#states").data("kendoDropDownList"),
  140.             cities = $("#cities").data("kendoDropDownList"),
  141.             garages = $("#garages").data("kendoDropDownList");
  142.  
  143.         $("#get").click(function () {
  144.             var stateInfo = "\nState: { id: " + states.value() + ", name: " + states.text() + " }",
  145.                 cityInfo = "\nCity: { id: " + cities.value() + ", name: " + cities.text() + " }",
  146.                 garageInfo = "\nGarage: { id: " + garages.value() + ", name: " + garages.text() + " }";
  147.  
  148.            
  149.         });
  150.     });
  151. </script>*@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement