mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-06 02:38:11 +01:00
ui: Expose min bid amount.
This commit is contained in:
@@ -22,3 +22,13 @@
|
||||
margin: 0;
|
||||
width:calc(33.33% - 25px);
|
||||
}
|
||||
|
||||
.error
|
||||
{
|
||||
background:#ff5b5b;
|
||||
}
|
||||
|
||||
.error_msg
|
||||
{
|
||||
color:red;
|
||||
}
|
||||
|
||||
27
basicswap/static/js/new_offer.js
Normal file
27
basicswap/static/js/new_offer.js
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
window.addEventListener('DOMContentLoaded', (event) => {
|
||||
let err_msgs = document.querySelectorAll('p.error_msg');
|
||||
for (let i=0; i < err_msgs.length; i++) {
|
||||
err_msg = err_msgs[i].innerText
|
||||
if (err_msg.indexOf('coin_to') >= 0 || err_msg.indexOf('Coin To') >= 0) {
|
||||
e = document.getElementById('coin_to');
|
||||
e.classList.add('error');
|
||||
}
|
||||
if (err_msg.indexOf('Coin From') >= 0) {
|
||||
e = document.getElementById('coin_from');
|
||||
e.classList.add('error');
|
||||
}
|
||||
if (err_msg.indexOf('Amount From') >= 0) {
|
||||
e = document.getElementById('amt_from');
|
||||
e.classList.add('error');
|
||||
}
|
||||
if (err_msg.indexOf('Amount To') >= 0) {
|
||||
e = document.getElementById('amt_to');
|
||||
e.classList.add('error');
|
||||
}
|
||||
if (err_msg.indexOf('Minimum Bid Amount') >= 0) {
|
||||
e = document.getElementById('amt_bid_min');
|
||||
e.classList.add('error');
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user