add invalid funds message on grouporder page

This commit is contained in:
Philipp Rothmann 2023-10-02 23:01:43 +02:00
parent 2ef17ceca4
commit 92edac9f9f
3 changed files with 7 additions and 7 deletions

View file

@ -180,16 +180,12 @@ function updateBalance() {
$('#new_balance').html(I18n.l("currency", balance));
$('#total_balance').val(I18n.l("currency", balance));
// determine bgcolor and submit button state according to balance
var bgcolor = '';
if (balance < minimumBalance) {
bgcolor = '#FF0000';
$('#submit_button').attr('disabled', 'disabled')
$('#available_funds_error').css('display', 'block')
} else {
$('#submit_button').removeAttr('disabled')
}
// update bgcolor
for (i in itemTotal) {
$('#td_price_' + i).css('background-color', bgcolor);
$('#available_funds_error').css('display', 'none')
}
}
@ -232,4 +228,6 @@ $(function() {
});
updateButtons($(document));
$(document).ready(updateBalance);
});

View file

@ -21,7 +21,8 @@
});
- title t('.title'), false
.alert.alert-error.alert-block#available_funds_error{style: ('display:none')}
= t '.invalid_funds'
.row-fluid
.well.pull-left
= close_button :alert

View file

@ -1064,6 +1064,7 @@ en:
units: Units
units_full: Filled units
units_total: Total units
invalid_funds: Not enough available funds
index:
closed_orders:
more: more...