Refactor adminWindowPageEdit