added condition to new advert dialog