Add user inputs to the delete modal

Add user inputs to the delete modal

jacktrapjacktrap Posts: 14Questions: 6Answers: 0

I require a username and password for inserting/editing/deleting any row in my data table.

I'm using the pure js datatables editor set up with mvc. It works fine for create/edit because I just include the username and password fields in my model. But for delete I don't seem to be able to map it to a template, or add/show any fields? It's stuck at just being one button "delete".

How do I have inputs on the delete modal?

Thanks

JackTrap

Answers

  • allanallan Posts: 63,464Questions: 1Answers: 10,466 Site admin

    Hi,

    I'm not clear on why you would want input elements on the delete action? Your user is already logged in I presume and a session controlling their access, and a delete action will just delete the entries rather than perform an update, so I'm not clear on why you would need to show the input elements for the fields in the form?

    Allan

  • jacktrapjacktrap Posts: 14Questions: 6Answers: 0
    edited November 2018

    Hello Allan,

    It's a requirement from the customer. All actions require a "e-signature" which is username and password. I need to be able to show which user deleted an item (i handle the delete serverside and just mark the record as "deleted" and the person who deleted it).

    Even though the user is logged in, requirement also states the actions require a signature too. The reasoning being that there are shared computers so someone might leave themselves logged in and someone else could delete a record under the logged in users account.

    I can do this for create and update easily enough, just wondering how do I add it to delete?

This discussion has been closed.