Я разрабатываю загрузочную модальную версию с частичным представлением (ядро .net) и хочу использовать некоторые флажки для завершения моего формуляра, но при нажатии кнопки флажок не меняется. Кажется, что он заморожен
Я использую VS 2017, C #, ядро .net и IIS v10
.
<!-- enter code here-->
@model Acre.Business.DTOs.FormMetadataDTO
@section head {
<link href="~/Content/summernote/summernote.css" rel="stylesheet" />
<link href="~/Content/summernote/plugin/databasic/summernote-ext-databasic.css" rel="stylesheet" />
}
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
</button>
<h4 class="modal-title" id="editLabel">Agregar <small>Metadatos</small></h4>
</div>
<div class="modal-body">
<!-- BEGIN FORM-->
<div class="form">
<div class="form-body">
<form asp-action="Create" asp-controller="FormMetadata" method="post" class="form-horizontal" role="form" id="FormMetadataMTE" novalidate="novalidate">
<div class="form-horizontal">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="alert alert-danger display-hide" id="ErrorMessage1">
<button class="close" data-close="alert"></button> Hay algunos errores en el formulario. Por favor verifique a continuación.
</div>
@*DUPLICADO*@
@*<div class="alert alert-danger display-hide" id="ErrorDuplicado" style="@(@ViewBag.StyleErrorMessage); display:@ViewBag.Display">
<button class="close" data-close="alert"></button> @ViewBag.ErrorDuplicado
</div>*@
<div class="alert alert-danger display-hide" id="ErrorMessage2" style="@(@ViewBag.StyleErrorMessage)">
<button class="close" data-close="alert"></button> @ViewBag.ErrorMessage
</div>
<div class="alert alert-success display-hide">
<button class="close" data-close="alert"></button> ¡La validación del formulario es exitosa!
</div>
<div class="row">
<div class="col-xs-6">
</div>
<div class="col-md-6">
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group form-md-line-input">
@*<label asp-for="TipoFormularioId" class="control-label col-md-4 text-right"></label>*@
@Html.LabelFor(model => model.TipoFormularioId, "TipoFormularioId", htmlAttributes: new { @class = "control-label col-md-4 text-right" })
<div class="col-xs-7">
<select asp-for="TipoFormularioId" class="form-control" asp-items="ViewBag.TipoFormularioId"></select>
@*@Html.DropDownList("TipoFormularioId", null, htmlAttributes: new { @class = "form-control", disabled= "disabled" })*@
<div class="form-control-focus"></div>
<span class="help-block">Seleccione el tipo de formulario</span>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group form-md-line-input">
<label asp-for="MetaCampoId" class="control-label col-md-4 text-right"></label>
<div class="col-xs-7">
<select asp-for="MetaCampoId" class="form-control" asp-items="ViewBag.MetaCampoId" id="MetaCampoId"></select>
<div class="form-control-focus"></div>
<span class="help-block">Seleccione el metacampo</span>
</div>
</div>
</div>
@*<div class="col-xs-6">
<div class="form-group form-md-line-input">
<label asp-for="TipoFormularioId" class="control-label col-md-4 text-right"></label>
<div class="col-xs-7">
<select asp-for="TipoFormularioId" class="form-control" asp-items="ViewBag.TipoFormularioId"></select>
<div class="form-control-focus"></div>
<span class="help-block">Seleccione el tipo de formulario</span>
</div>
</div>
</div>*@
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group form-md-line-input">
<label asp-for="MetaEtiqueta" class="control-label col-md-4 text-right"></label>
<div class="col-xs-7">
<input asp-for="MetaEtiqueta" class="form-control" autocomplete="off" />
<div class="form-control-focus"></div>
<span class="help-block">Escriba MetaEtiqueta</span>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group form-md-line-input">
<label asp-for="Orden" class="control-label col-md-4 text-right"></label>
<div class="col-xs-7">
<input asp-for="Orden" class="form-control" autocomplete="off" />
<div class="form-control-focus"></div>
<span class="help-block">Escriba Orden</span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group form-md-line-input">
@Html.LabelFor(model => model.Requerido, htmlAttributes: new { @class = "control-label col-md-4" })
<div class="col-md-4">
<div class="md-checkbox-list">
<div class="md-checkbox">
@Html.CheckBoxFor(model => model.Requerido, new { @class = "md-check" })
<label class="col-md-1 md-checkbox md-checkbox-outline text-right" for="Requerido">
<span class="inc"></span>
<span class="check"></span>
<span class="box"></span>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group form-md-line-input">
@Html.LabelFor(model => model.VisibleEnGrid, htmlAttributes: new { @class = "control-label col-md-4" })
<div class="col-md-4">
<div class="md-checkbox-list">
<div class="md-checkbox">
@Html.CheckBoxFor(model => model.VisibleEnGrid, new { @class = "md-check" })
<label class="col-md-1 md-checkbox md-checkbox-outline text-right" for="VisibleEnGrid">
<span class="inc"></span>
<span class="check"></span>
<span class="box"></span>
</label>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div class="form-group form-md-line-input">
@Html.LabelFor(model => model.Privado, htmlAttributes: new { @class = "control-label col-md-4" })
<div class="col-md-4">
<div class="md-checkbox-list">
<div class="md-checkbox">
@Html.CheckBoxFor(model => model.Privado, new { @class = "md-check" })
<label class="col-md-1 md-checkbox md-checkbox-outline text-right" for="Privado">
<span class="inc"></span>
<span class="check"></span>
<span class="box"></span>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-6">
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="form-group form-md-line-input">
<label asp-for="Ayuda" class="control-label col-md-2 text-right"></label>
<div class="col-xs-9">
<input asp-for="Ayuda" class="form-control Editor" autocomplete="off" />
<div class="form-control-focus"></div>
<span class="help-block">Escriba Ayuda</span>
</div>
</div>
</div>
</div>
</div>
<div class="form-actions">
<div class="row">
<div class="col-md-offset-5">
@*@Html.ActionLink("Cancelar", "Index", "FormMetadata", null, new { @class = "btn red" })*@
@*<a href="@TempData["Refer"]" class="btn red">Cancelar</a>*@
<button type="button" class="btn red" id="crudCancel" data-dismiss="modal">Cancelar</button>
<input type="submit" value="Guardar" class="btn blue" />
</div>
</div>
</div>
</form>
</div>
</div> <!-- END FORM-->
</div>
@*<div class="modal-footer">
<button type="button" data-dismiss="modal" class="btn default">Cerrar</button>
<button type="submit" class="btn blue" id="btnGuardar">
<i class="fa fa-check"></i> Guardar
</button>
</div>*@
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
<script src="~/Content/summernote/summernote.js"></script>
<script src="~/Content/summernote/plugin/databasic/summernote-ext-databasic.js"></script>
<script src="~/Content/summernote/plugin/hello/summernote-ext-hello.js"></script>
<script src="~/Content/summernote/lang/summernote-es-ES.js"></script>
<script src="~/Content/summernote/plugin/specialchars/summernote-ext-specialchars.js"></script>
<script src="~/Scripts/home-index.js"></script>
}
Я ожидаю, что мой флажок поменяет состояние при нажатии на него