A generic edit dialog for angular and bootstrap