Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion app/views/admin/shop_items/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,12 @@
<h3>Warehouse Settings</h3>
<div class="shop-item-form__field">
<%= f.label :agh_contents, "AGH Contents (JSON)", class: "shop-item-form__label" %>
<%= f.text_area :agh_contents, rows: 4, id: "shop_item_agh_contents", class: "form-control shop-item-form__code", placeholder: '[{"sku": "ITEM-001", "quantity": 1}]' %>
<%= f.text_area :agh_contents, rows: 4, id: "shop_item_agh_contents", class: "form-control shop-item-form__code", placeholder: '[{"sku": "ITEM-001", "quantity": 1}]', value: shop_item.agh_contents.present? ? JSON.pretty_generate(shop_item.agh_contents) : '' %>
<span class="shop-item-form__hint">List SKUs to include. Quantity selected by user will batch all SKUs together.</span>
<div class="alert alert-warning" style="margin-top: 0.5rem;">
<strong>Required:</strong> This field must contain valid JSON (not Ruby hash syntax).
Use double quotes for keys and strings. <a href="https://github.com/hackclub/flavortown/issues/1172" target="_blank" rel="noopener">See issue #1172 for more info</a>.
</div>
</div>
</div>

Expand Down
Loading