Made changes on new and edit page of templates model