moved edit transaction code into its own directive