Fix add content

Please accept this pull request.
This fix makes the 'add content' and 'edit form field' modal popup features behave correctly.