tarstarkes / Icarus

Grande Ronde Model Watershed - Site Rebuild
0 stars 0 forks source link

ATLAS - Disable submit buttons after click [BL] #43

Closed tarstarkes closed 7 years ago

tarstarkes commented 7 years ago

Write a function to disable submit buttons after the first click so that multiple calls are not made to the server for the same thing. This should prevent accidental duplicate calls.

tarstarkes commented 7 years ago

PROBLEM: cannot "disable" the button because doing so literally disables it from doing anything, including continuing the action for the previous click. Perhaps it would be useful if we could disable the button by simply adding a class to the button called 'disabled' and the a handler for that click to prevent default behavior.

tarstarkes commented 7 years ago

Submit buttons for the edit_opportunity page have been updated to disable on click so that multiple form submissions will not occur. I wrote two functions, one to handle the disabling of input tags inside of a form, and the other to handle the disabling of buttons outside the form area. Still need to do the same to the edit_bsr_detail page and a few elements on the bsr_view page.

tarstarkes commented 7 years ago

Complete. All form submission buttons for atlas are disabled upon click so as to disallow second form submissions.