Updated create routine for admin and javascript for create routine