Task #149: Validate js code, remove dublicated if in php, hide new fieds ifrom task 157 in create event page