Ticket #1080: fixed button color (primary -> secondary), also fixed bug caused by edit / non-edit pages