0
Good morning.
By clicking a button, this button calls a modal, whose call happens twice, and I can’t understand why this call is coming twice as you can see in the following picture.
Call of the model
<p>
<a href="#" id="btnDistribuir" class="btn btn-success" data-action="Distribui" data-toggle='tooltip' data-placement='top' title='Distribuir Pedidos para Operação'>
<span class="glyphicon glyphicon-plus"></span>
Registro | Cadastrar | Create
</a>
</p>
Model code with error
@model PortalLatam.Models.PedidosModel
@{
ViewBag.Title = "Distribuir Documentos";
}
<h2>Distribuir Documentos para Operação</h2>
<style>
.modal .modal-dialog {
width: 60%;
}
</style>
<head>
<meta name="viewport" content="width=device-width" />
<title>Distribuir</title>
</head>
<div class="form-group">
<div class="row">
<div class="col-xs-8">
<div class="form-group">
<label for="cmbColaboradores">Colaboradores</label>
<select class="form-control" id="cmbColaboradores"></select>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="col-xs-12">
<input class="checkbox-inline" type="checkbox" name="chkSelecionaTodos" id="chkSelecionaTodos" />
<span>Selecionar todos</span>
</div>
</div>
</div>
<div class="row">
<div class='col-xs-12'>
<div class="col-xs-1">#</div>
<div class="col-xs-2">Número do Protocolo </div>
<div class="col-xs-3">Data do Protocolo </div>
<div class="col-xs-3">Colaborador </div>
<div class="col-xs-3">BP </div>
</div>
</div>
<div class="row">
<div id="pedidos">
</div>
</div>
<div class="row">
<div class="col-xs-12">
<input type="button" class="btn btn-success" id="btnGravar" name="btnGravar" value="Gravar" />
</div>
</div>
</div>
@Scripts.Render("~/bundles/jqueryval")
<script src="~/Scripts/projeto/EnviarFormulario.js"></script>
<script src="~/Scripts/Projeto/DistribuiPedidoLatam.js"></script>
<script type="text/javascript">
var btnAcao = $("input[type='button']");
var formulario = $("#formCrud");
</script>
The question was very difficult to understand... I didn’t understand what you need, and you say "model code that is in error", which model? the correct would not be View ?
– Leonardo Bonetti
Yes, it would be a view called in modal, not model rs
– gabrielfalieri
Put the modal call script and include the modal code
– Netinho Santos
The modal call is there and modal code too
– gabrielfalieri