Made a bit of progress by moving the button code from router to firewallEditor, making it its own function, and rerendering the controller tpl at the end of that function. Doesn't work perfectly (alerts twice in a row when visited from another page), but progress. Also made it so the same option can't be clicked twice (disabled). This only works sometimes due to its placement.