Advertisement
Guest User

Untitled

a guest
Dec 12th, 2016
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.56 KB | None | 0 0
  1.  
  2. @using Domain.Entities.DataCapture;
  3. @using Service.Interfaces;
  4. @using Service.Interfaces.ServiceResult;
  5. @using Service.Interfaces.ViewModels;
  6. @using UI.Utils
  7. @model ServiceResult<QuoteMultipleViewModel>
  8. @section styles
  9. {
  10. <link href="~/Content/motorcycle.css" rel="stylesheet">
  11. <link href="~/Content/Site.css" rel="stylesheet">
  12. }
  13.  
  14.  
  15. @{ Html.RenderPartial("_PartialSteps", 3); }
  16. <div class="row setup-content step activeStepInfo" id="step-2">
  17. <div class="col-xs-12">
  18. <div class="col-md-12 well @((Session["Theme"] != null && (bool)Session["Theme"] == true)?"rider-color":"light-color") text-center">
  19. <form method="post" action="/DataCapture/PostQuotation" novalidate>
  20. <div class="row">
  21. <div class="col-md-12">
  22. <div class="form-group row">
  23. <h2 class="data-capture-title col-md-12">Your Quotation</h2>
  24. <hr class="title-hr" />
  25. </div>
  26. <div class="form-group">
  27. <label>Policy Number: 125/007/S328/WEB</label>
  28. </div>
  29. <div class="form-group pointer-hover">
  30. <table id="policyTableId" class="table table-responsive">
  31. <thead>
  32. <tr>
  33. <th>Insurer Details</th>
  34. <th>Premium</th>
  35. <th>Policy Information</th>
  36. <th><span class="glyphicon glyphicon-record"></span></th>
  37. </tr>
  38. </thead>
  39. <tbody>
  40. @foreach (var item in Model.Data.Model)
  41. {
  42. <tr>
  43. <td>@item.Insurer</td>
  44. <td>@item.GrossPremium £</td>
  45. <td>@((item.Excesses != null && item.Excesses.Count > 0) ? item.Excesses.Sum(i => i.Amount) + " £" : 0 + " £") </td>
  46. <td>
  47. <input id="policyRadioBtnId" type="radio" name="policySelect">
  48. </td>
  49. </tr>
  50. }
  51. </tbody>
  52. </table>
  53. </div>
  54. <div id="optionalExtrasDiv" style="display:none">
  55. <div class="form-group row">
  56. <h2 class="data-capture-title col-md-12">Optional Extras</h2>
  57. <hr class="title-hr" />
  58. </div>
  59. <div class="form-group pointer-hover">
  60. <table id="optionalextras" class="table table-responsive">
  61. <thead>
  62. <tr>
  63. <th>Your Policy</th>
  64. <th>Price</th>
  65. <th><span class="glyphicon glyphicon-ok"></span></th>
  66. </tr>
  67. </thead>
  68. <tbody>
  69. @foreach (var item in Model.Data.Model)
  70. {
  71. <tr>
  72. <td>@item.Insurer</td>
  73. <td>@item.GrossPremium £</td>
  74. <td><input type="checkbox" name="" value=""></td>
  75. </tr>
  76. }
  77. </tbody>
  78. </table>
  79. </div>
  80. </div>
  81. </div>
  82. <div class="form-group">
  83. <a class="terms">Terms &amp; Conditions</a>
  84. </div>
  85. <h3 class="login-details">Login Details</h3>
  86. <div class="form-group">
  87. <p class="details login-details">
  88. Your quote details have been saved, so if you wish to return to your quote you won’t have to re-enter your details (though you should check each time whether anything, including start date, needs updating).
  89. Please use the following login details to revisit your quote.
  90. </p>
  91. <strong class="user-login-details">Username:user@@outlook.com; Password:CYJ56C9 </strong>
  92. </div>
  93. <div class="form-group">
  94. <a class="btn btn-default" href="/DataCapture/OtherDetails">Change Quote Details</a>
  95. <a class="btn btn-default" href="/Home/Index">Home</a>
  96. </div>
  97. </div>
  98. </form>
  99. </div>
  100. </div>
  101. </div>
  102.  
  103. @section scripts {
  104. <script>
  105. $(document).ready(function () {
  106. $($(".step > div")[4]).click();
  107.  
  108. $('#optionalextras tbody tr').click(function (event) {
  109. var selected = $(this).hasClass("highlightTable");
  110. $(':checkbox', this).trigger('click');
  111. if (!selected) {
  112. $(this).addClass("highlightTable");
  113. } else {
  114. $(this).removeClass("highlightTable");
  115. }
  116. });
  117.  
  118. $('#policyTableId tbody tr').click(function () {
  119. var checked = $(this).find('td input:radio').prop('checked', true);
  120. if (checked) {
  121. var selected = $(this).hasClass("highlightTable");
  122. if (!selected) {
  123. $("#policyTableId tbody tr").removeClass("highlightTable");
  124. $(this).addClass("highlightTable");
  125.  
  126. }
  127. showTable();
  128. }
  129. })
  130. });
  131.  
  132. function showTable() {
  133. $('#optionalExtrasDiv').css('display', 'block');
  134. }
  135. </script>
  136. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement