Added update functionality to view template