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

37 lines
1.4 KiB
Twig
Raw Normal View History

{#
# Admin Package Row Template
#
# @package WC_Tier_Package_Prices
# @var int index
# @var array package
#}
<div class="wc-tpp-package-row">
<p class="form-field">
<label>{{ 'Quantity'|__('wc-tier-package-prices') }}</label>
<input type="number"
name="_wc_tpp_packages[{{ index|esc_attr }}][qty]"
value="{{ package.qty|default('')|esc_attr }}"
placeholder="{{ 'e.g., 10'|__('wc-tier-package-prices') }}"
min="1"
step="1"
class="short">
</p>
<p class="form-field">
<label>{{ 'Fixed Price'|__('wc-tier-package-prices') }}</label>
<input type="text"
name="_wc_tpp_packages[{{ index|esc_attr }}][price]"
value="{{ package.price|default('')|esc_attr }}"
placeholder="{{ 'e.g., 99.99'|__('wc-tier-package-prices') }}"
class="short wc_input_price">
</p>
<p class="form-field">
<label>{{ 'Label (Optional)'|__('wc-tier-package-prices') }}</label>
<input type="text"
name="_wc_tpp_packages[{{ index|esc_attr }}][label]"
value="{{ package.label|default('')|esc_attr }}"
placeholder="{{ 'e.g., Starter Pack'|__('wc-tier-package-prices') }}"
class="regular">
</p>
<button type="button" class="button wc-tpp-remove-package">{{ 'Remove'|__('wc-tier-package-prices') }}</button>
</div>