Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.80 KB | None | 0 0
  1. @using Common.I18n.Borrowers
  2. @using Common.I18n.BorrowersComments
  3. @using Common.I18n.Documents
  4. @model KeplerModel.Persistence.DcM_Documents
  5. @{
  6. Layout = "~/Views/Shared/_LayoutPopup.cshtml";
  7. string ocultar = "ocultar";
  8. string toggle = "hidden";
  9. //Typodedocumento 6 o 7 es litigio o contrato
  10. //if (Model.idDocumentType == 6 || Model.idDocumentType == 7)
  11. //{
  12. // ocultar = "ocultar";
  13. //}
  14. }
  15. <head>
  16. <style type="text/css">
  17. .ocult{
  18. visibility: hidden;
  19. }
  20. </style>
  21. </head>
  22. <div class="portlet box blue mbn ">
  23. <div class="portlet-title">
  24. <div class="caption">
  25. <i class="fa fa-file-text-o"></i>
  26. <span class="caption-subject">
  27. @TextDocuments.titleAddDocument
  28. </span>
  29. </div>
  30. </div>
  31. <div class="portlet-body form ">
  32. @using (Html.BeginForm(null, null, FormMethod.Post, new { @id = "idPopup", @class = "form-popup", enctype = "multipart/form-data" }))
  33. {
  34. @Html.AntiForgeryToken()
  35. <div class="form-body">
  36. <div class="row">
  37. @Html.ValidationSummary(true, "", new { @class = "text-danger" })
  38. @Html.Hidden("idLitigation", TempData["idLitigation"])
  39. @Html.HiddenFor(model => model.originalName)
  40. <div class="col-md-4">
  41. <div class="form-group">
  42. @Html.LabelFor(model => model.idDocumentType, TextDocuments.lblDocumentsType)
  43. @Html.DropDownList("idDocumentType", null, TextDocuments.txtSelect, new { @class = "form-control select2me" })
  44. @Html.ValidationMessageFor(model => model.idDocumentType, "", new { @class = "text-danger" })
  45. </div>
  46. </div>
  47. <div class="col-md-4">
  48. <div class="form-group">
  49. @Html.LabelFor(model => model.IsSealedCopy, TextDocuments.lblIsSealedCopy)
  50. @Html.DropDownList("IsSealedCopy", null, TextDocuments.txtSelect, new { @class = "form-control select2me", @onChange = "needSealedCopyViewManagement(this)" })
  51. @Html.ValidationMessageFor(model => model.IsSealedCopy, "", new { @class = "text-danger" })
  52. </div>
  53. </div>
  54. <div class="col-md-4">
  55. <div id="ReturnSealedCopyForm" class="form-group">
  56. @Html.LabelFor(model => model.ReturnSealedCopy, TextDocuments.lblDocumentsReturnSealedCopy)
  57. @Html.DropDownList("ReturnSealedCopy", null, TextDocuments.txtSelect, new { @class = "form-control select2me" })
  58. @Html.ValidationMessageFor(model => model.ReturnSealedCopy, "", new { @class = "text-danger" })
  59. </div>
  60. </div>
  61. <div class="col-md-4">
  62. <div id="idDocumentOriginForm" class="form-group hide">
  63. @Html.LabelFor(model => model.idDocumentOrigin, TextDocuments.lblOriginalDocument)
  64. @Html.DropDownList("idDocumentOrigin", null, TextDocuments.txtOriginalNotUploaded, new { @disabled = "disabled", @class = "form-control select2me" })
  65. @Html.ValidationMessageFor(model => model.idDocumentOrigin, "", new { @class = "text-danger" })
  66. </div>
  67. </div>
  68. </div>
  69. <div class="row">
  70. <div class="col-md-6 @(ocultar) ocult" id="idFechaEnvio">
  71. <div class="form-group">
  72.  
  73. @Html.LabelFor(model => model.SendDate, TextDocuments.sendDate)
  74. @Html.EditorFor(model => model.SendDate, new { htmlAttributes = new { @class = "form-control date-picker", @placeholder = TextDocuments.sendDate.ToLower() } })
  75. @Html.ValidationMessageFor(model => model.SendDate, "", new { @class = "text-danger" })
  76.  
  77. </div>
  78. </div>
  79.  
  80. <div class="col-md-6">
  81. <div id="idFechaRecepcion" class="form-group">
  82. @Html.LabelFor(model => model.ReceptionDate, TextDocuments.receptionDate)
  83. @Html.EditorFor(model => model.ReceptionDate, new { htmlAttributes = new { @class = "form-control date-picker", @placeholder = TextDocuments.receptionDate.ToLower() } })
  84.  
  85. @Html.ValidationMessageFor(model => model.ReceptionDate, "", new { @class = "text-danger" })
  86. </div>
  87. </div>
  88.  
  89.  
  90. </div>
  91. <div class="row">
  92. <div class="col-md-12 ">
  93. <div class="form-group">
  94. @Html.LabelFor(model => model.description, TextDocuments.lblDocumentsDescription)
  95. @Html.TextAreaFor(model => model.description, 5, 70, new { @class = "form-control", @placeholder = TextDocuments.lblDocumentsDescription.ToLower() })
  96. @Html.ValidationMessageFor(model => model.description, "", new { @class = "text-danger" })
  97. </div>
  98. </div>
  99. </div>
  100. <div class="row">
  101. <div class="col-md-12">
  102. <div class="form-group">
  103. @Html.LabelFor(model => model.originalName, TextDocuments.lblDocumentsName)
  104. <div class="fileinput fileinput-new" data-provides="fileinput">
  105. <div class="input-group input-large">
  106. <div class="form-control uneditable-input input-fixed input-medium" data-trigger="fileinput">
  107. <span class="fileinput-filename"></span>
  108. </div>
  109. <span class="input-group-addon btn default btn-file">
  110. <span class="fileinput-new">@TextDocuments.txtSelect</span>
  111. <span class="fileinput-exists">@TextDocuments.lblChange</span>
  112. @*<input type="file" id="DocumentFile" name="DocumentFile" />*@
  113. @Html.TextBoxFor(m => m.DocumentFile, new { type = "file" })
  114. </span>
  115. <a href="javascript:;" class="input-group-addon btn red fileinput-exists" data-dismiss="fileinput">Eliminar</a>
  116. </div>
  117. @Html.ValidationMessageFor(model => model.originalName, "", new { @class = "text-danger" })
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. <div class="form-actions right">
  123. <button type="submit" class="btn btn-primary">@TextDocuments.btnSave</button>
  124. </div>
  125. </div>
  126. }
  127. </div>
  128. </div>
  129.  
  130.  
  131.  
  132. <script>
  133.  
  134. var idDocument = $('#idDocumentType').val();
  135. var IsSealedCopy = $('#IsSealedCopy').val();
  136. var ReturnSealedCopy = $('#ReturnSealedCopy').val();
  137. var toglge = document.getElementById("idFechaEnvio");
  138. console.log(idDocument + "," + IsSealedCopy + "," + ReturnSealedCopy);
  139.  
  140. $('#idDocumentType').change(function ocultar() {
  141. idDocument = $(this).val();
  142. console.log(idDocument + "," + IsSealedCopy + "," + ReturnSealedCopy);
  143. if ((idDocument == 6 || idDocument == 7) && IsSealedCopy == "false" && ReturnSealedCopy == "true"){
  144. $('.ocultar').each(function hideFields() {
  145. $(this).show();
  146. $('.ocult').removeClass('visibility: hidden').addClss('visibility: visible')
  147. });
  148. } else {
  149. $('.ocultar').each(function hideFields() {
  150. $(this).hide();
  151. });
  152. }
  153. });
  154. $('#IsSealedCopy').change(function ocultar() {
  155. IsSealedCopy = $(this).val();
  156. console.log(idDocument + "," + IsSealedCopy + "," + ReturnSealedCopy);
  157. if ((idDocument == 6 || idDocument == 7) && IsSealedCopy == "false" && ReturnSealedCopy == "true") {
  158. $('.ocultar').each(function hideFields() {
  159. $(this).show();
  160. });
  161. } else {
  162. $('.ocultar').each(function hideFields() {
  163. $(this).hide();
  164. });
  165. }
  166. });
  167. $('#ReturnSealedCopy').change(function ocultar() {
  168. ReturnSealedCopy = $(this).val();
  169. console.log(idDocument + "," + IsSealedCopy + "," + ReturnSealedCopy);
  170. if ((idDocument == 6 || idDocument == 7) && IsSealedCopy == "false" && ReturnSealedCopy == "true") {
  171. $('.ocultar').each(function hideFields() {
  172. $(this).show();
  173. });
  174. } else {
  175. $('.ocultar').each(function hideFields() {
  176. $(this).hide();
  177. });
  178. }
  179. });
  180.  
  181.  
  182.  
  183. //$('#idDocumentType').change(function ocultar() {
  184. // //console.log("entra");
  185. // var idDocument = $(this).val();
  186. // //console.log(idDocument);
  187. // var IsSealedCopy = $(this).val();
  188. // var ReturnSealedCopy
  189. // if (idDocument == 6 || idDocument == 7) {
  190. // $('.ocultar').each(function hideFields() {
  191. // $(this).hide();
  192. // });
  193. // } else {
  194. // $('.ocultar').each(function hideFields() {
  195. // $(this).show();
  196. // });
  197. // }
  198. //});
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement