ajax edit and create of posts