Split ajaxify code for the 'new' tab into its own function
Split ajaxify code for the 'new' tab into its own function

This will be useful shortly when we move the form handling into its own view that renders that tab independently

jnns/wagtail,mixxorz/wagtail,rsalmaso/wagtail,jnns/wagtail,mixxorz/wagtail,wagtail/wagtail,rsalmaso/wagtail,zerolab/wagtail,jnns/wagtail,mixxorz/wagtail,thenewguy/wagtail,thenewguy/wagtail,wagtail/wagtail,zerolab/wagtail,rsalmaso/wagtail,rsalmaso/wagtail,thenewguy/wagtail,mixxorz/wagtail,wagtail/wagtail,thenewguy/wagtail,zerolab/wagtail,mixxorz/wagtail,thenewguy/wagtail,rsalmaso/wagtail,wagtail/wagtail,jnns/wagtail,wagtail/wagtail,zerolab/wagtail,zerolab/wagtail