mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-10-23 03:37:01 +09:00
Fix currency settings throwing on missing sync rates (#3733)
* Fix currency settings throwing on missing sync rates * Update cspell.json and GOVERNANCE.md * Escape sync_rate and provider values * Update cspell.json
This commit is contained in:
1 parent
5ecfeb335e
commit
2cf48e23c8
3 files changed
+14
-16
No files matched your search
+1
-1
@@ -66,7 +66,7 @@ As of this writing, the SC consists of the following individuals (listed by GitH
|
||||
|
||||
- [admdly](https://github.com/admdly)
|
||||
- [BelleNottelling](https://github.com/BelleNottelling)
|
||||
- [evrifaessa](https://github.com/evrifaessa)
|
||||
- [yagiz-dev](https://github.com/yagiz-dev)
|
||||
- [HunterNyan](https://github.com/HunterNyan)
|
||||
- [jaapmarcus](https://github.com/jaapmarcus)
|
||||
|
||||
|
||||
+3
-7
@@ -6,7 +6,6 @@
|
||||
"huraga",
|
||||
"FOSSBilling",
|
||||
"BoxBilling",
|
||||
"evrifaessa",
|
||||
"andpavlenko",
|
||||
"jaapmarcus",
|
||||
"Plesk",
|
||||
@@ -16,14 +15,9 @@
|
||||
"Kloxo",
|
||||
"Ispconfig",
|
||||
"Interkassa",
|
||||
"Payza",
|
||||
"Hostinger",
|
||||
"docusaurus",
|
||||
"Laravel",
|
||||
"pastable",
|
||||
"Nyan",
|
||||
"recognised",
|
||||
"fordnox",
|
||||
"Dockerized",
|
||||
"process",
|
||||
"unsuspended",
|
||||
@@ -50,7 +44,9 @@
|
||||
"Segoe",
|
||||
"minmax",
|
||||
"grecaptcha",
|
||||
"resends"
|
||||
"resends",
|
||||
"Parenthesise",
|
||||
"yagiz"
|
||||
],
|
||||
|
||||
"ignoreWords": [
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
{% set can_delete_currency = has_permission('currency', 'delete') %}
|
||||
{% set can_set_default_currency = has_permission('currency', 'set_default') %}
|
||||
{% set can_update_currency_rates = has_permission('currency', 'update_rates') %}
|
||||
{% set sync_rate = params.sync_rate|default('auto') %}
|
||||
{% set provider = params.provider|default('exchangerate-api') %}
|
||||
|
||||
{% block meta_title %}{{ 'Currency Settings'|trans }}{% endblock %}
|
||||
|
||||
@@ -76,7 +78,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if params.sync_rate != 'never' %}
|
||||
{% if sync_rate != 'never' %}
|
||||
<div class="alert alert-success" role="alert">
|
||||
<strong class="me-1">{{ 'Success:'|trans }}</strong>{{ 'FOSSBilling is configured to automatically sync currency exchange rates.'|trans }}
|
||||
</div>
|
||||
@@ -145,7 +147,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer text-center">
|
||||
{% if can_update_currency_rates and params.provider|default('exchangerate-api') == "exchangerate-api" and not params.exchangerate_api_key %}
|
||||
{% if can_update_currency_rates and provider == "exchangerate-api" and not params.exchangerate_api_key|default('') %}
|
||||
<a href="https://www.exchangerate-api.com" target="_blank"><p class="mt-1 mb-0">{{ 'Currency exchange rates by ExchangeRate-API'|trans }}</p></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -214,9 +216,9 @@
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<label class="form-label">{{ 'API Key'|trans }}</label>
|
||||
<input class="form-control" type="text" name="exchangerate_api_key" id="exchangerate_api" value="{{ params.exchangerate_api_key }}" hidden="true">
|
||||
<input class="form-control" type="text" name="currencydata_key" id="currencydata" value="{{ params.currencydata_key }}" hidden="true">
|
||||
<input class="form-control" type="text" name="currencylayer_key" id="currencylayer" value="{{ params.currencylayer_key }}" hidden="true">
|
||||
<input class="form-control" type="text" name="exchangerate_api_key" id="exchangerate_api" value="{{ params.exchangerate_api_key|default('') }}" hidden="true">
|
||||
<input class="form-control" type="text" name="currencydata_key" id="currencydata" value="{{ params.currencydata_key|default('') }}" hidden="true">
|
||||
<input class="form-control" type="text" name="currencylayer_key" id="currencylayer" value="{{ params.currencylayer_key|default('') }}" hidden="true">
|
||||
<small class="form-hint" id="exchangerate_api_help_text" hidden="true">{{ 'Leave blank to use ExchangeRate-API (Open Access).'|trans }}</small>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
@@ -348,9 +350,9 @@
|
||||
document.getElementById("provider_select").onchange = function() {
|
||||
switchKeyBox(this.value);
|
||||
};
|
||||
document.getElementById("sync_rate").value = "{{ params.sync_rate }}";
|
||||
document.getElementById("provider_select").value = "{{ params.provider|default('exchangerate-api') }}";
|
||||
switchKeyBox("{{ params.provider|default('exchangerate-api') }}");
|
||||
document.getElementById("sync_rate").value = "{{ sync_rate|e('js') }}";
|
||||
document.getElementById("provider_select").value = "{{ provider|e('js') }}";
|
||||
switchKeyBox("{{ provider|e('js') }}");
|
||||
|
||||
{% if can_create_currency %}
|
||||
if (window.location.hash === '#tab-new-currency') {
|
||||
|
||||
Reference in new issue
Block a user