ui: New offer, when 'Lock Rate' is set rate must update if it's empty.
Remove invalid coins from coin from list.
This commit is contained in:
5 files changed
+20
-9
No files matched your search
@@ -23,7 +23,7 @@
|
||||
|
||||
<tr class="padded_row"><td class="bold">Coin From</td><td>
|
||||
<select name="coin_from_" disabled><option value="-1">-- Select Coin --</option>
|
||||
{% for c in coins %}
|
||||
{% for c in coins_from %}
|
||||
<option{% if data.coin_from==c[0] %} selected{% endif %} value="{{ c[0] }}">{{ c[1] }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<tr><td>Coin From</td><td>
|
||||
<select id="coin_from" name="coin_from" onchange="set_rate('coin_from');"><option value="-1">-- Select Coin --</option>
|
||||
{% for c in coins %}
|
||||
{% for c in coins_from %}
|
||||
<option{% if data.coin_from==c[0] %} selected{% endif %} value="{{ c[0] }}">{{ c[1] }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
@@ -102,7 +102,7 @@ function set_rate(value_changed) {
|
||||
const amt_from = document.getElementById('amt_from').value;
|
||||
const amt_to = document.getElementById('amt_to').value;
|
||||
const rate = document.getElementById('rate').value;
|
||||
const lock_rate = document.getElementById('rate_lock').checked;
|
||||
const lock_rate = rate == '' ? false : document.getElementById('rate_lock').checked;
|
||||
|
||||
if (coin_from == '-1' || coin_to == '-1') {
|
||||
return;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<tr class="padded_row"><td class="bold">Coin From</td><td>
|
||||
<select name="coin_from_" disabled><option value="-1">-- Select Coin --</option>
|
||||
{% for c in coins %}
|
||||
{% for c in coins_from %}
|
||||
<option{% if data.coin_from==c[0] %} selected{% endif %} value="{{ c[0] }}">{{ c[1] }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<table>
|
||||
<tr><td>Coin From</td><td>
|
||||
<select name="coin_from"><option value="-1"{% if filters.coin_from==-1 %} selected{% endif %}>-- Any Coin --</option>
|
||||
{% for c in coins %}
|
||||
{% for c in coins_from %}
|
||||
<option value="{{ c[0] }}"{% if filters.coin_from==c[0] %} selected{% endif %}>{{ c[1] }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
Reference in new issue
Block a user