Product error handling
This commit is contained in:
@@ -1,13 +1,22 @@
|
||||
.row.menu-product-container
|
||||
if editMode
|
||||
.small-3.columns= input value=product.name
|
||||
.small-3.columns= edit-currency value=product.price validatePresence=true
|
||||
.small-3.columns
|
||||
= input value=product.name
|
||||
= errors product.errors.name
|
||||
.small-3.columns
|
||||
= edit-currency value=product.price validatePresence=true
|
||||
= errors product.errors.price
|
||||
.small-3.columns= input value=product.code
|
||||
.small-3.columns
|
||||
a.destroy-product-action{action "destroyProduct" product}: span
|
||||
a.save-product-action{action "save"}: span
|
||||
else
|
||||
.small-3.columns: span= product.name
|
||||
.small-3.columns= currency product.price
|
||||
.small-3.columns: span= product.code_or_empty
|
||||
.small-3.columns: span.fa.fa-edit{action "makeEditable"}
|
||||
if showProduct
|
||||
.small-3.columns
|
||||
span= product.name
|
||||
= errors product.errors.name includeAttribute="product"
|
||||
.small-3.columns
|
||||
= currency product.price
|
||||
= errors product.errors.price includeAttribute="product"
|
||||
.small-3.columns: span= code_filter_display
|
||||
.small-3.columns: span.fa.fa-edit{action "makeEditable"}
|
||||
|
||||
Reference in New Issue
Block a user