Using ajax in advanced module
Hi,
I am working in a advanced module which shows the list of registered user. If an user is newly registered his registration is need to be approved by admin.
I am having a status field in table by default it is 0. In model list_items() function i have a query which retrieves values from table. My table headers are "name, email, skill and status" right now am getting the values but in status i have to check the condition if status is 0 text has to be two anchor tag with text "Approve" and "Reject", so when i click "Approve" it needs to make a ajax request and email has to be sent the registered user and my status has to show "approved".. How to do this?
Comments
In your case, you will need to load that additional javascript with your module. If the registered users is a simple module inside your advanced module, you can use the 'js' parameter in your module's configuration to load in your javascript:
http://docs.getfuelcms.com/general/javascript#modules
There is some additional documentation here that may also be helpful:
http://docs.getfuelcms.com/general/javascript#ajax
http://docs.getfuelcms.com/general/javascript#jqx