Globally define $pagename in init.php and use it in addForm() when
refering to page itself. Also replace empty pagename in have_printing().