Conditional clause on edit button