Updates the create rule view, moves js code to the end of the page.