changing delete's button name according the state of the database