Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @using Common.I18n.Borrowers
- @using Common.I18n.BorrowersComments
- @using Common.I18n.Documents
- @model KeplerModel.Persistence.DcM_Documents
- @{
- Layout = "~/Views/Shared/_LayoutPopup.cshtml";
- string ocultar = "ocultar";
- string toggle = "hidden";
- //Typodedocumento 6 o 7 es litigio o contrato
- //if (Model.idDocumentType == 6 || Model.idDocumentType == 7)
- //{
- // ocultar = "ocultar";
- //}
- }
- <head>
- <style type="text/css">
- .ocult{
- visibility: hidden;
- }
- </style>
- </head>
- <div class="portlet box blue mbn ">
- <div class="portlet-title">
- <div class="caption">
- <i class="fa fa-file-text-o"></i>
- <span class="caption-subject">
- @TextDocuments.titleAddDocument
- </span>
- </div>
- </div>
- <div class="portlet-body form ">
- @using (Html.BeginForm(null, null, FormMethod.Post, new { @id = "idPopup", @class = "form-popup", enctype = "multipart/form-data" }))
- {
- @Html.AntiForgeryToken()
- <div class="form-body">
- <div class="row">
- @Html.ValidationSummary(true, "", new { @class = "text-danger" })
- @Html.Hidden("idLitigation", TempData["idLitigation"])
- @Html.HiddenFor(model => model.originalName)
- <div class="col-md-4">
- <div class="form-group">
- @Html.LabelFor(model => model.idDocumentType, TextDocuments.lblDocumentsType)
- @Html.DropDownList("idDocumentType", null, TextDocuments.txtSelect, new { @class = "form-control select2me" })
- @Html.ValidationMessageFor(model => model.idDocumentType, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="col-md-4">
- <div class="form-group">
- @Html.LabelFor(model => model.IsSealedCopy, TextDocuments.lblIsSealedCopy)
- @Html.DropDownList("IsSealedCopy", null, TextDocuments.txtSelect, new { @class = "form-control select2me", @onChange = "needSealedCopyViewManagement(this)" })
- @Html.ValidationMessageFor(model => model.IsSealedCopy, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="col-md-4">
- <div id="ReturnSealedCopyForm" class="form-group">
- @Html.LabelFor(model => model.ReturnSealedCopy, TextDocuments.lblDocumentsReturnSealedCopy)
- @Html.DropDownList("ReturnSealedCopy", null, TextDocuments.txtSelect, new { @class = "form-control select2me" })
- @Html.ValidationMessageFor(model => model.ReturnSealedCopy, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="col-md-4">
- <div id="idDocumentOriginForm" class="form-group hide">
- @Html.LabelFor(model => model.idDocumentOrigin, TextDocuments.lblOriginalDocument)
- @Html.DropDownList("idDocumentOrigin", null, TextDocuments.txtOriginalNotUploaded, new { @disabled = "disabled", @class = "form-control select2me" })
- @Html.ValidationMessageFor(model => model.idDocumentOrigin, "", new { @class = "text-danger" })
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-md-6 @(ocultar) ocult" id="idFechaEnvio">
- <div class="form-group">
- @Html.LabelFor(model => model.SendDate, TextDocuments.sendDate)
- @Html.EditorFor(model => model.SendDate, new { htmlAttributes = new { @class = "form-control date-picker", @placeholder = TextDocuments.sendDate.ToLower() } })
- @Html.ValidationMessageFor(model => model.SendDate, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="col-md-6">
- <div id="idFechaRecepcion" class="form-group">
- @Html.LabelFor(model => model.ReceptionDate, TextDocuments.receptionDate)
- @Html.EditorFor(model => model.ReceptionDate, new { htmlAttributes = new { @class = "form-control date-picker", @placeholder = TextDocuments.receptionDate.ToLower() } })
- @Html.ValidationMessageFor(model => model.ReceptionDate, "", new { @class = "text-danger" })
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12 ">
- <div class="form-group">
- @Html.LabelFor(model => model.description, TextDocuments.lblDocumentsDescription)
- @Html.TextAreaFor(model => model.description, 5, 70, new { @class = "form-control", @placeholder = TextDocuments.lblDocumentsDescription.ToLower() })
- @Html.ValidationMessageFor(model => model.description, "", new { @class = "text-danger" })
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <div class="form-group">
- @Html.LabelFor(model => model.originalName, TextDocuments.lblDocumentsName)
- <div class="fileinput fileinput-new" data-provides="fileinput">
- <div class="input-group input-large">
- <div class="form-control uneditable-input input-fixed input-medium" data-trigger="fileinput">
- <span class="fileinput-filename"></span>
- </div>
- <span class="input-group-addon btn default btn-file">
- <span class="fileinput-new">@TextDocuments.txtSelect</span>
- <span class="fileinput-exists">@TextDocuments.lblChange</span>
- @*<input type="file" id="DocumentFile" name="DocumentFile" />*@
- @Html.TextBoxFor(m => m.DocumentFile, new { type = "file" })
- </span>
- <a href="javascript:;" class="input-group-addon btn red fileinput-exists" data-dismiss="fileinput">Eliminar</a>
- </div>
- @Html.ValidationMessageFor(model => model.originalName, "", new { @class = "text-danger" })
- </div>
- </div>
- </div>
- </div>
- <div class="form-actions right">
- <button type="submit" class="btn btn-primary">@TextDocuments.btnSave</button>
- </div>
- </div>
- }
- </div>
- </div>
- <script>
- var idDocument = $('#idDocumentType').val();
- var IsSealedCopy = $('#IsSealedCopy').val();
- var ReturnSealedCopy = $('#ReturnSealedCopy').val();
- var toglge = document.getElementById("idFechaEnvio");
- console.log(idDocument + "," + IsSealedCopy + "," + ReturnSealedCopy);
- $('#idDocumentType').change(function ocultar() {
- idDocument = $(this).val();
- console.log(idDocument + "," + IsSealedCopy + "," + ReturnSealedCopy);
- if ((idDocument == 6 || idDocument == 7) && IsSealedCopy == "false" && ReturnSealedCopy == "true"){
- $('.ocultar').each(function hideFields() {
- $(this).show();
- $('.ocult').removeClass('visibility: hidden').addClss('visibility: visible')
- });
- } else {
- $('.ocultar').each(function hideFields() {
- $(this).hide();
- });
- }
- });
- $('#IsSealedCopy').change(function ocultar() {
- IsSealedCopy = $(this).val();
- console.log(idDocument + "," + IsSealedCopy + "," + ReturnSealedCopy);
- if ((idDocument == 6 || idDocument == 7) && IsSealedCopy == "false" && ReturnSealedCopy == "true") {
- $('.ocultar').each(function hideFields() {
- $(this).show();
- });
- } else {
- $('.ocultar').each(function hideFields() {
- $(this).hide();
- });
- }
- });
- $('#ReturnSealedCopy').change(function ocultar() {
- ReturnSealedCopy = $(this).val();
- console.log(idDocument + "," + IsSealedCopy + "," + ReturnSealedCopy);
- if ((idDocument == 6 || idDocument == 7) && IsSealedCopy == "false" && ReturnSealedCopy == "true") {
- $('.ocultar').each(function hideFields() {
- $(this).show();
- });
- } else {
- $('.ocultar').each(function hideFields() {
- $(this).hide();
- });
- }
- });
- //$('#idDocumentType').change(function ocultar() {
- // //console.log("entra");
- // var idDocument = $(this).val();
- // //console.log(idDocument);
- // var IsSealedCopy = $(this).val();
- // var ReturnSealedCopy
- // if (idDocument == 6 || idDocument == 7) {
- // $('.ocultar').each(function hideFields() {
- // $(this).hide();
- // });
- // } else {
- // $('.ocultar').each(function hideFields() {
- // $(this).show();
- // });
- // }
- //});
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement