Save entered details to database. Only close editing if db call was successful.