added function "create event" for "edit post"