currencies-dropdown.twig
5 years ago
currency-switcher-options-dialog.twig
1 year ago
currency-switcher-options.twig
2 years ago
custom-prices.twig
5 years ago
exchange-rates.twig
4 years ago
multi-currency.twig
4 years ago
exchange-rates.twig
139 lines
| 1 | <div class="wcml-section" id="online-exchange-rates" {% if multi_currency_on is empty %}style="display:none"{% endif %}> |
| 2 | |
| 3 | <div class="wcml-section-header"> |
| 4 | <h3>{{ exchange_rates.strings.header }}</h3> |
| 5 | </div> |
| 6 | |
| 7 | <div class="wcml-section-content" id="online-exchange-rates-no-currencies" {% if exchange_rates.secondary_currencies %} style="display:none"{% endif %}> |
| 8 | <p><i>{{ exchange_rates.strings.no_currencies }}</i></p> |
| 9 | </div> |
| 10 | <div class="wcml-section-content" {% if exchange_rates.secondary_currencies is empty %} style="display:none"{% endif %}> |
| 11 | <p> |
| 12 | <input type="checkbox" id="exchange-rates-automatic" name="exchange-rates-automatic" value="1" |
| 13 | {% if exchange_rates.settings.automatic == 1 %}checked="checked"{% endif %} /> |
| 14 | <label for="exchange-rates-automatic">{{ exchange_rates.strings.enable_automatic }}</label> |
| 15 | </p> |
| 16 | |
| 17 | <div id="exchange-rates-online-wrap" |
| 18 | class="exchange-rates-online-wrap"{% if exchange_rates.settings.automatic == 0 %} style="display: none;"{% endif %} > |
| 19 | |
| 20 | <div class="wcml-section-content-inner"> |
| 21 | <p id="update-rates-time">{{ exchange_rates.strings.updated_time|raw }}</p> |
| 22 | |
| 23 | <p> |
| 24 | <input type="button" id="update-rates-manually" class="button-secondary" |
| 25 | value="{{ exchange_rates.strings.update }}" |
| 26 | {% if not exchange_rates.has_actionable_service %}disabled="disabled"{% endif %} |
| 27 | /> |
| 28 | <i class="otgs-ico-help wcml-tip" data-tip="{{ exchange_rates.strings.update_tip }}" |
| 29 | {% if exchange_rates.has_actionable_service %}style="display: none"{% endif %} |
| 30 | ></i> |
| 31 | <span id="update-rates-spinner" class="spinner" style="float:none;"></span> |
| 32 | <input type="hidden" id="update-exchange-rates-nonce" value="{{ exchange_rates.strings.nonce }}"/> |
| 33 | </p> |
| 34 | |
| 35 | <p class="notice inline notice-success" id="exchange-rates-success" |
| 36 | style="{% if not exchange_rates_manually_updated %}display:none{% endif %}">{{ exchange_rates.strings.updated_success }}</p> |
| 37 | <p class="notice inline notice-error" id="exchange-rates-error" style="display:none"></p> |
| 38 | </div> |
| 39 | |
| 40 | <div class="wcml-section-content-inner"> |
| 41 | <h4>{{ exchange_rates.strings.services_label }}</h4> |
| 42 | <ul class="exchange-rates-sources"> |
| 43 | |
| 44 | {% for id, service in exchange_rates.services %} |
| 45 | <li> |
| 46 | <input type="radio" id="service-{{ id }}" name="exchange-rates-service" value="{{ id }}" |
| 47 | {% if exchange_rates.settings.service == id %}checked="checked"{% endif %} /> |
| 48 | <label for="service-{{ id }}"> |
| 49 | {{ service.name }} |
| 50 | </label> |
| 51 | <a href="{{ service.url }}" title="{{ exchange_rates.strings.visit_website }}" class="exchange-rate-service-website no-ico" target="_blank"> |
| 52 | <span class="dashicons dashicons-external"></span> |
| 53 | </a> |
| 54 | <div class="service-details-wrap" {% if exchange_rates.settings.service != id %} style="display: none;"{% endif %} > |
| 55 | |
| 56 | {% if service.requires_key %} |
| 57 | {{ exchange_rates.strings.key_required }} |
| 58 | <input type="text" name="services[{{ id }}][api-key]" |
| 59 | value="{{ service.api_key }}" |
| 60 | placeholder="{{ exchange_rates.strings.key_placeholder }}" |
| 61 | size="40" /> |
| 62 | {% endif %} |
| 63 | |
| 64 | <p class="notice inline notice-warning" {% if 'fixerio' != id %}style="display:none"{% endif %}> |
| 65 | {{ exchange_rates.strings.fixerio_warning }} |
| 66 | </p> |
| 67 | <p class="notice inline notice-error" id="service-error-{{ id }}" {% if service.last_error == false %}style="display:none"{% endif %}> |
| 68 | {% if service.last_error %} |
| 69 | {{service.last_error.text}} <i>({{service.last_error.time}})</i> |
| 70 | {% endif %} |
| 71 | </p> |
| 72 | |
| 73 | </div> |
| 74 | </li> |
| 75 | {% endfor %} |
| 76 | </ul> |
| 77 | </div> |
| 78 | |
| 79 | <div class="wcml-section-content-inner"> |
| 80 | <h4>{{ exchange_rates.strings.lifting_label }}</h4> |
| 81 | <p>{{ exchange_rates.strings.lifting_details1 }}</p> |
| 82 | <input type="number" name="lifting_charge" value="{{ settings.lifting_charge }}" step="any" style="width:64px" /> % |
| 83 | <p><i>{{ exchange_rates.strings.lifting_details2|format( exchange_rates.services[exchange_rates.settings.service].name ) }}</i></p> |
| 84 | </div> |
| 85 | |
| 86 | <div class="wcml-section-content-inner"> |
| 87 | |
| 88 | <h4>{{ exchange_rates.strings.frequency }}</h4> |
| 89 | |
| 90 | <ul> |
| 91 | <li> |
| 92 | <input type="radio" id="update-frequency-daily" name="update-schedule" value="daily" |
| 93 | {% if exchange_rates.settings.schedule == 'daily' %}checked="checked"{% endif %}/> |
| 94 | <label for="update-frequency-daily">{{ exchange_rates.strings.daily }}</label> |
| 95 | </li> |
| 96 | |
| 97 | <li> |
| 98 | <input type="radio" id="update-frequency-hourly" name="update-schedule" value="hourly" |
| 99 | {% if exchange_rates.settings.schedule == 'hourly' %}checked="checked"{% endif %}/> |
| 100 | <label for="update-frequency-hourly">{{ exchange_rates.strings.hourly }}</label> |
| 101 | <p class="notice inline notice-warning" {% if 'hourly' == exchange_rates.settings.schedule %}style="display:none"{% endif %}> |
| 102 | {{ exchange_rates.strings.daily_warning }} |
| 103 | </p> |
| 104 | </li> |
| 105 | |
| 106 | <li> |
| 107 | <input type="radio" id="update-frequency-weekly" name="update-schedule" value="weekly" |
| 108 | {% if exchange_rates.settings.schedule == 'weekly' %}checked="checked"{% endif %} /> |
| 109 | <label for="update-frequency-weekly">{{ exchange_rates.strings.weekly }}</label> |
| 110 | <select name="update-weekly-day" |
| 111 | {% if exchange_rates.settings.schedule != 'weekly' %}disabled{% endif %}> |
| 112 | {% for i in 0..6 %} |
| 113 | <option value="{{ i }}"{% if exchange_rates.settings.week_day == i %} selected="selected"{% endif %}>{{ get_weekday(i) }}</option> |
| 114 | {% endfor %} |
| 115 | </select> |
| 116 | </li> |
| 117 | |
| 118 | <li> |
| 119 | <input type="radio" id="update-frequency-monthly" name="update-schedule" value="monthly" |
| 120 | {% if exchange_rates.settings.schedule == 'monthly' %}checked="checked"{% endif %} /> |
| 121 | <label for="update-frequency-monthly">{{ exchange_rates.strings.monthly }}</label> |
| 122 | <select name="update-monthly-day" |
| 123 | {% if exchange_rates.settings.schedule != 'monthly' %}disabled{% endif %}> |
| 124 | {% for i in 1..31 %} |
| 125 | <option value="{{ i }}"{% if exchange_rates.settings.month_day == i %} selected="selected"{% endif %}>{{ i }}{% if i == 1 %}st{% elseif i == 2 %}nd{% elseif i == 2 %}rd{% else %}th{% endif %}</option> |
| 126 | {% endfor %} |
| 127 | </select> |
| 128 | </li> |
| 129 | |
| 130 | <li> |
| 131 | <input type="radio" id="update-frequency-manual" name="update-schedule" value="manual" |
| 132 | {% if exchange_rates.settings.schedule == 'manual' %}checked="checked"{% endif %} /> |
| 133 | <label for="update-frequency-manual">{{ exchange_rates.strings.manually }}</label> |
| 134 | </li> |
| 135 | </ul> |
| 136 | </div> |
| 137 | </div> |
| 138 | </div> |
| 139 | </div> |