lundi 2 décembre 2019

Error on modal of bootstrap, doesnt work the button of "save". Laravel 5.8 BootStrap 3

I am creating the modals of my project in Laravel. I already got the modal to work when clicking to delete. What happens is that when I click on "save changes", to finish deleting, it does nothing. Absolutely nothing happens. I would like to know what is happening, because I really do not know, I had never worked with modals before.

This is what the buttons of my view are, without the modal they work perfectly, they edit and delete, in fact I only care about the modal in eliminating, that I managed to eliminate when clicking.

<td>
                   <a href="empleados/edit/" style="width: 60%;" class="btn btn-primary">Editar</a>
                   <form action="empleados/" method="POST" class="">
                               @method('DELETE')
                               @csrf
                               <button type="button" data-toggle="modal" data-target="#delete" value="submit" style="width: 60%;" class="btn btn-primary">Eliminar</button>



                   </form>
                 </td>

This is what is in my view, the modal as such.


 <div class="modal modal-danger fade" id="delete">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">
                  <span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title"></h4>
              </div>
             </div>
                 <div class="modal-body">
                <p>¿Esta seguro de eliminar este empleado?&hellip;</p>
              </div>

              <div class="modal-footer">
                <button type="button" class="btn btn-outline pull-left" data-dismiss="modal">Salir</button>
                <button type="button" id="eliminar" class="btn btn-outline">Eliminar</button>
              </div>
            </div>
            <!-- /.modal-content -->
          </div>
          <!-- /.modal-dialog -->
        </div>


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire