Permalink
Browse files

Don't show volume prices marked for destruction.

  • Loading branch information...
1 parent 21caba7 commit d3b2f8498b957364e0d20b7a7d0795184b518b5f @amw amw committed Mar 2, 2011
Showing with 15 additions and 13 deletions.
  1. +15 −13 app/views/admin/base/_volume_price_fields.html.erb
@@ -1,13 +1,15 @@
-<tr class="fields">
- <td valign="top">
- <%= f.text_field :starting_quantity, :size => 10 %>
- <%= error_message_on(f.object, :starting_quantity) %>
- </td>
- <td valign="top">
- <%= f.text_field :price, :size => 10 %>
- <%= error_message_on(f.object, :price) %>
- </td>
- <td valign="top">
- <%= link_to_remove_fields t("remove"), f %>
- </td>
-</tr>
+<% unless f.object.marked_for_destruction? %>
+ <tr class="fields">
+ <td valign="top">
+ <%= f.text_field :starting_quantity, :size => 10 %>
+ <%= error_message_on(f.object, :starting_quantity) %>
+ </td>
+ <td valign="top">
+ <%= f.text_field :price, :size => 10 %>
+ <%= error_message_on(f.object, :price) %>
+ </td>
+ <td valign="top">
+ <%= link_to_remove_fields t("remove"), f %>
+ </td>
+ </tr>
+<% end %>

0 comments on commit d3b2f84

Please sign in to comment.