A ReferenceError was being thrown for the toggle_disabled_state function.
I was not able to directly reproduce this, but since this is only used
once in the same file, I'm pretty sure this is because it is used before
it is defined. This commit changes the order in which the functions in
that file are defined.
Closes https://community.openproject.org/projects/openproject/work_packages/43230/activity