Files
wc-tier-and-package-prices/templates/admin/package-row.twig

38 lines
1.3 KiB
Twig
Raw Permalink Normal View History

{#
# Admin Package Row Template
#
# @package WC_Tier_Package_Prices
# @var int index
# @var array package
# @var string field_prefix (optional) - Prefix for field names (for variations)
#}
{% set name_prefix = field_prefix is defined ? field_prefix : '_wc_tpp_packages' %}
<tr class="wc-tpp-package-row">
<td>
<input type="number"
name="{{ name_prefix }}[{{ index|esc_attr }}][qty]"
value="{{ package.qty|default('')|esc_attr }}"
placeholder="{{ 'e.g., 10'|__('wc-tier-package-prices') }}"
min="1"
step="1"
class="short">
</td>
<td>
<input type="text"
name="{{ name_prefix }}[{{ index|esc_attr }}][price]"
value="{{ package.price|default('')|esc_attr }}"
2025-12-30 05:02:50 +01:00
placeholder="{{ 'e.g., 99.99 ' ~ currency_symbol }}"
class="short wc_input_price">
</td>
<td>
<input type="text"
name="{{ name_prefix }}[{{ index|esc_attr }}][label]"
value="{{ package.label|default('')|esc_attr }}"
placeholder="{{ 'e.g., Starter Pack'|__('wc-tier-package-prices') }}"
class="regular">
</td>
<td>
<button type="button" class="button wc-tpp-remove-package">{{ 'Remove'|__('wc-tier-package-prices') }}</button>
</td>
</tr>