Added exchange rates form

This commit is contained in:
eeintech committed 2021-05-20 09:49:56 -04:00
1 parent 6d5b2d3227
commit bed6a7e49c
6 files changed
+125 -43

No files matched your search

@@ -26,18 +26,15 @@
</div>
</div>
<table class='table table-striped table-condensed' id='exchange-rates'>
</table>
<form action="{% url 'refresh-exchange-rates' %}" method="post">
<form action="{% url 'settings-currencies' %}" method="post">
{% csrf_token %}
<button type="submit" class='btn btn-primary'>{% trans "Refresh Exchange Rates" %}</button>
{% load crispy_forms_tags %}
{% crispy form %}
{% if exchange_backend == 'fixer.io' %}
<button type="submit" class='btn btn-primary'>{% trans "Refresh Exchange Rates" %}</button>
{% else %}
<button type="submit" class='btn btn-primary'>{% trans "Update Exchange Rates" %}</button>
{% endif %}
</form>
{% endblock %}
{% block js_ready %}
{{ block.super }}
{% comment %} TODO: Update exchange-rates table! {% endcomment %}
{% comment %} Or do it using context instead of JS? {% endcomment %}
{% endblock %}