lndg/gui/templates/batch.html
BhhagBoseDK e03f89a0d4
Channel Size Step = 1
Channel Size Step was 1000 which would not allow channel with specific size not rounded to 1000.
2023-04-04 17:52:05 +01:00

37 lines
1.6 KiB
HTML

{% extends "base.html" %}
{% block title %} {{ block.super }} - Batch Open{% endblock %}
{% block content %}
{% load humanize %}
<script>
function update_total(input){
let total = [...document.querySelectorAll('[id^="amt"]')].map(i => parseInt(i.value) || 0).reduce((prev, curr) => prev + curr)
document.getElementById("remaining").innerHTML = "Remaining Onchain Balance: " + ({{balances.total_balance}} - total).toLocaleString()
document.getElementById("total").innerHTML = "Total: " + total.toLocaleString()
}
</script>
<div class="w3-container w3-padding-small">
<h2>Batch Open Up To 10 Channels</h2>
<form action="/batchopen/" method="post">
{% csrf_token %}
<table class="w3-table-all w3-centered w3-hoverable">
<tr>
<th>ID</th>
<th>Pubkey</th>
<th>Amount (sats)</th>
</tr>
{% for num in iterator %}
<tr>
<td>{{ num }}</td>
<td><input style="text-align:center;min-width:800px" id="pubkey{{ num }}" name="pubkey{{ num }}" value=""></td>
<td><input style="text-align:center" oninput="update_total(this)" id="amt{{ num }}" type="number" min="0" step="1" name="amt{{ num }}" value=""></td>
</tr>
{% endfor %}
<tr><td>#</td><td id="remaining" style="min-width:800px">Remaining Onchain Balance: {{balances.total_balance|intcomma}}</td><td id="total">Total: 0</td></tr>
</table>
<ul>
Opening Fee Rate (sats/vbyte): <input style="text-align:center" id="fee_rate" type="number" min="1" name="fee_rate" value="">
<input type="submit" value="OK">
</ul>
</form>
</div>
{% endblock %}