Advertisement
Guest User

Untitled

a guest
Dec 12th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.54 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. }
  12.  
  13.  
  14. @{ Html.RenderPartial("_PartialSteps", 3); }
  15. <div class="row setup-content step activeStepInfo" id="step-2">
  16. <div class="col-xs-12">
  17. <div class="col-md-12 well @((Session["Theme"] != null && (bool)Session["Theme"] == true)?"rider-color":"light-color") text-center">
  18. <form method="post" action="/DataCapture/PostQuotation" novalidate>
  19. <div class="row">
  20. <div class="col-md-12">
  21. <div class="form-group row">
  22. <h2 class="data-capture-title col-md-12">Your Quotation</h2>
  23. <hr class="title-hr" />
  24. </div>
  25. <div class="form-group">
  26. <label>Policy Number: 125/007/S328/WEB</label>
  27. </div>
  28. <div class="form-group pointer-hover">
  29. <table id="policyTableId" class="table table-responsive">
  30. <thead>
  31. <tr>
  32. <th>Insurer Details</th>
  33. <th>Premium</th>
  34. <th>Policy Information</th>
  35. </tr>
  36. </thead>
  37. <tbody>
  38. @foreach (var item in Model.Data.Model)
  39. {
  40. <tr>
  41. <td>@item.Insurer</td>
  42. <td>@item.GrossPremium £</td>
  43. <td>@((item.Excesses != null && item.Excesses.Count > 0) ? item.Excesses.Sum(i => i.Amount) + " £" : 0 + " £") </td>
  44. <td>
  45. <input id="policyRadioBtnId" type="radio" name="policySelect">
  46. </td>
  47. </tr>
  48. }
  49. </tbody>
  50. </table>
  51.  
  52. </div>
  53. <div class="form-group row">
  54. <h4 class="data-capture-title col-md-12">OPTIONAL EXTRAS</h4>
  55. <hr class="title-hr" />
  56. </div>
  57. <div id="optionalExtrasDiv" class="form-group pointer-hover" style="display:none">
  58. <table id="optionalextras" class="table table-responsive">
  59. <thead>
  60. <tr>
  61. <th>Your Policy</th>
  62. <th>Price</th>
  63. <th></th>
  64. </tr>
  65. </thead>
  66. <tbody>
  67. @foreach (var item in Model.Data.Model)
  68. {
  69. <tr>
  70. <td>@item.Insurer</td>
  71. <td>@item.GrossPremium £</td>
  72. <td><input type="checkbox" name="" value=""></td>
  73. </tr>
  74. }
  75. </tbody>
  76. </table>
  77. </div>
  78.  
  79. </div>
  80. <div class="form-group">
  81. <a class="terms">Terms &amp; Conditions</a>
  82. </div>
  83. <h3 class="login-details">Login Details</h3>
  84. <div class="form-group">
  85.  
  86. <p class="details login-details">
  87. 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).
  88. Please use the following login details to revisit your quote.
  89. </p>
  90. <strong class="user-login-details">Username:user@@outlook.com; Password:CYJ56C9 </strong>
  91. </div>
  92. <div class="form-group">
  93. <a class="btn btn-default" href="/DataCapture/OtherDetails">Change Quote Details</a>
  94. <a class="btn btn-default" href="/Home/Index">Home</a>
  95. </div>
  96. </div>
  97. </form>
  98. </div>
  99. </div>
  100. </div>
  101. <style type="text/css">
  102. .highlightTable {
  103. background-color: white;
  104. }
  105.  
  106. .pointer-hover {
  107. cursor: pointer;
  108. }
  109. .xshow {
  110.  
  111. display : block;
  112. }
  113.  
  114. </style>
  115. @section scripts {
  116. <script>
  117. $('#policyTableId tbody tr').click(function () {
  118. var checked = $(this).find('td input:radio').prop('checked', true);
  119. if (checked) {
  120. var selected = $(this).hasClass("highlightTable");
  121. if (!selected) {
  122. $("#policyTableId tbody tr").removeClass("highlightTable");
  123. $(this).addClass("highlightTable");
  124.  
  125. }
  126. //LOGIKA TUKA DOKOLKU E SELEKTIRANA REDICA
  127. //showDiv();
  128. }
  129. })
  130.  
  131. $(document).ready(function () {
  132. $($(".step > div")[4]).click();
  133.  
  134. $('#optionalextras tbody tr').click(function (event) {
  135. var selected = $(this).hasClass("highlightTable");
  136. $(':checkbox', this).trigger('click');
  137. if (!selected) {
  138. $(this).addClass("highlightTable");
  139. } else {
  140. $(this).removeClass("highlightTable");
  141. }
  142. });
  143. });
  144. //function showDiv()
  145. //{
  146. // $('input[type="radio"]').click(function () {
  147. // // $("#optionalExtrasDiv").removeAttr("style");
  148.  
  149. // var element = document.getElementById('optionalExtrasDiv');
  150. // element.style.display = 'block';
  151. // //$("#optionalExtrasDiv").attr("display", );
  152. // });
  153. //}
  154.  
  155.  
  156. $(document).ready(function () {
  157. $("#optionalExtrasDiv").hide();
  158.  
  159. $('input[type=radio]').change(function () {
  160. var isChecked = $(this).prop('checked');
  161. var isShow = $(this).hasClass('xshow');
  162. $("#optionalExtrasDiv").toggle(isChecked && isShow);
  163. });
  164. });
  165.  
  166. $(document).ready(function () {
  167. $('input[type="radio"]').click(function () {
  168. if ($(this).attr('id') == 'policyRadioBtnId') {
  169. $('#optionalExtrasDiv').show();
  170. }
  171.  
  172. else {
  173. $('#optionalExtrasDiv').hide();
  174. }
  175. });
  176. });
  177. </script>
  178. }
  179.  
  180. var element = document.getElementById('optionalExtrasDiv');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement