HTML Form Template Different Commands On The Same Button
I have two collections of the same type of items on the same page that
currently use the same Moustach HTML template for rendering. The template
contains a Remove button.
The problem is that Remove in each context needs to perform something
different (essentially based on which div it is currently in).
My reluctance to use two templates is that I'm trying to stick to a
one-to-one relationship between DataContract objects and templates so that
an item is always displayed consistently in the UI.
The forms are going to submitted via ajax.
What is the best option for handling this?
Create another template (really want to avoid doing this)? Add a class
name to each button?
No comments:
Post a Comment