jeudi 7 septembre 2017

(Laravel) Confirmation model on delete button

I have a view which display a table of users from the database and the last column has delete button on it which currently work fine for me but i want to display confirmation model and when the user click on Delete button it will delete the selected use

This is the current code for delete button which is work fine:

<a href=""><button type="button" class="btn mr-0 mb-0 btn-outline-primary btn-sm"><i class="icon-trash3"></i></button></a>

Now i used this model which i have to click on delete button in order to delete the selected user

<div class="modal fade text-xs-left" id="iconModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel2" aria-hidden="true">
                                  <div class="modal-dialog" role="document">
                                    <div class="modal-content">
                                      <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                          <span aria-hidden="true">&times;</span>
                                        </button>
                                        <h4 class="modal-title" id="myModalLabel2"><i class="icon-warning2"></i> Confirmation Message</h4>
                                      </div>
                                      <div class="modal-body">
                                        <p>Are you sure that you want to <strong>Delete</strong> this user ?</p>

                                      </div>
                                      <div class="modal-footer">
                                        <button type="button" class="btn grey btn-outline-secondary" data-dismiss="modal">Close</button>
                                        <button type="button" class="btn btn-outline-primary">Delete</button>
                                      </div>
                                    </div>
                                  </div>
                                </div>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire