Good morning.
When you click a button, this button calls a modal, whose call happens twice, and I can not understand why this call is coming twice as you can see in the following image.
Callingthemodel
<p><ahref="#" 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 that is in 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>