added cancel button to edit template