{% if is_variation %}
    <tr><td>
{% endif %}

<div class="wcml_custom_prices_block">
    {% if currencies is empty  %}
        <div class="wcml_custom_prices_options_block">
            <label>{{ strings.not_set|raw }}</label>
        </div>
    {% else %}
        <div class="wcml_custom_prices_options_block">

            <label for="wcml_custom_prices_auto[{{ product_id }}]">
                <input type="radio" name="_wcml_custom_prices[{{ product_id }}]" id="wcml_custom_prices_auto[{{ product_id }}]" value="0" class="wcml_custom_prices_input" {{ checked_calc_auto|raw }} />
                {{ strings.calc_auto }}&nbsp;
                <span class="block_actions" {% if checked_calc_auto is not empty %} style="display: inline;" {% endif %}>(
                    <a href="" class="wcml_custom_prices_auto_block_show" title="{{ strings.see_prices|e }}">{{ strings.show }}</a>
                    <a href="" class="wcml_custom_prices_auto_block_hide">{{ strings.hide }}</a>
                )</span>
            </label>


            <label for="wcml_custom_prices_manually[{{ product_id }}]">
                <input type="radio" name="_wcml_custom_prices[{{ product_id }}]" value="1" id="wcml_custom_prices_manually[{{ product_id }}]" class="wcml_custom_prices_input" {{ checked_calc_manually|raw }} />
                {{ strings.set_manually }}
            </label>
            <div class="wcml_custom_prices_manually_block_control">
                <a {% if checked_calc_manually is not empty %} style="display:none" {% endif %} href="" class="wcml_custom_prices_manually_block_show">&raquo; {{ strings.enter_prices }}</a>
                <a style="display:none" href="" class="wcml_custom_prices_manually_block_hide">- {{ strings.hide_prices }}</a>
            </div>
        </div>

        <div class="wcml_custom_prices_manually_block" {% if checked_calc_manually is not empty %} style="display: block;" {% endif %}>
            {% for currency in currencies %}
                <div class="currency_blck">
                    <label>
                        {{ currency.currency_format|raw }}
                    </label>

                    {% if currency.custom_price['_regular_price'] is empty %}
                        <span class="wcml_no_price_message">{{ strings.det_auto }}</span>
                    {% endif %}

                    {% if is_variation %}
                        {% for key, custom_price in currency.custom_price %}
                            <p>
                                <label>{{ strings[key] }} ( {{ currency.currency_symbol|raw }} )</label>
                                <input type="text"
                                       name="_custom_variation{{ key }}{{ currency.custom_id }}"
                                       class="wc_input_price wcml_input_price short wcml{{ key }}"
                                       value="{{ custom_price }}" step="any" min="0" />
                            </p>
                        {% endfor %}
                    {% else %}
                        {% for custom_price_html in currency.custom_html %}
                            {{ custom_price_html|raw }}
                        {% endfor %}
                    {% endif %}

                    <div class="wcml_schedule">
                        <label>{{ strings.schedule }}</label>
                        <div class="wcml_schedule_options">


                            <label for="wcml_schedule_auto[{{ currency.currency_code }}]{{ html_id }}">
                                <input type="radio" name="_wcml_schedule[{{ currency.currency_code }}]{{ html_id }}"
                                       id="wcml_schedule_auto[{{ currency.currency_code }}]{{ html_id }}"
                                       value="0"
                                       class="wcml_schedule_input" {{ currency.schedule_auto_checked|raw }} />
                                {{ strings.same_as_def }}
                            </label>


                            <label for="wcml_schedule_manually[{{ currency.currency_code }}]{{ html_id }}">
                                <input type="radio" name="_wcml_schedule[{{ currency.currency_code }}]{{ html_id }}"
                                       value="1"
                                       id="wcml_schedule_manually[{{ currency.currency_code }}]{{ html_id }}"
                                       class="wcml_schedule_input" {{ currency.schedule_man_checked|raw }} />
                                {{ strings.set_dates }}
                                <span class="block_actions">(
                                    <a href="" class="wcml_schedule_manually_block_show">{{ strings.schedule }}</a>
                                    <a href="" class="wcml_schedule_manually_block_hide">{{ strings.collapse }}</a>
                                )</span>
                            </label>

                            <div class="wcml_schedule_dates">
                                <input type="text" class="short custom_sale_price_dates_from"
                                       name="_custom{% if is_variation %}_variation{% endif %}_sale_price_dates_from{{ currency.custom_id }}"
                                       id="_custom_sale_price_dates_from{{ currency.custom_id }}"
                                       value="{{ currency.sale_price_dates_from|e }}"
                                       placeholder="{{ strings.from|raw }} YYYY-MM-DD"
                                       maxlength="10" pattern="[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])" />

                                <input type="text" class="short custom_sale_price_dates_to"
                                       name="_custom{% if is_variation %}_variation{% endif %}_sale_price_dates_to{{ currency.custom_id }}"
                                       id="_custom_sale_price_dates_to{{ currency.custom_id }}"
                                       value="{{ currency.sale_price_dates_to|e }}"
                                       placeholder="{{ strings.to|raw }}  YYYY-MM-DD"
                                       maxlength="10" pattern="[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])" />

                            </div>
                        </div>
                    </div>
                </div>
            {% endfor %}
        </div>

        <div class="wcml_automaticaly_prices_block">

            {% for currency in currencies %}
                <label>{{ currency.currency_format|raw }}</label>

                {% if is_variation %}
                    {% for key, readonly_price in currency.readonly_price %}
                        <p>
                            <label>{{ strings[key] }} ( {{ currency.currency_symbol|raw }} )</label>
                            <input type="text"
                                   name="_readonly{{ key }}"
                                   class="wc_input_price short"
                                   value="{{ readonly_price|e }}"
                                   step="any" min="0" readonly = "readonly"
                                   rel="{{ currency.rate|e }}" />
                        </p>
                    {% endfor %}
                {% else %}
                    {% for readonly_html_price in currency.readonly_html %}
                        {{ readonly_html_price|raw }}
                    {% endfor %}
                {% endif %}
            {% endfor %}
        </div>
    {% endif %}

    {% if is_variation is empty %}
        <div class="wcml_price_error">{{ strings.enter_price }}</div>
    {% endif %}
</div>

{% if is_variation %}
    </td></tr>
{% endif %}