add invalid funds message on grouporder page
This commit is contained in:
parent
82f0935d65
commit
260c51eef5
3 changed files with 7 additions and 7 deletions
|
@ -180,16 +180,12 @@ function updateBalance() {
|
||||||
$('#new_balance').html(I18n.l("currency", balance));
|
$('#new_balance').html(I18n.l("currency", balance));
|
||||||
$('#total_balance').val(I18n.l("currency", balance));
|
$('#total_balance').val(I18n.l("currency", balance));
|
||||||
// determine bgcolor and submit button state according to balance
|
// determine bgcolor and submit button state according to balance
|
||||||
var bgcolor = '';
|
|
||||||
if (balance < minimumBalance) {
|
if (balance < minimumBalance) {
|
||||||
bgcolor = '#FF0000';
|
|
||||||
$('#submit_button').attr('disabled', 'disabled')
|
$('#submit_button').attr('disabled', 'disabled')
|
||||||
|
$('#available_funds_error').css('display', 'block')
|
||||||
} else {
|
} else {
|
||||||
$('#submit_button').removeAttr('disabled')
|
$('#submit_button').removeAttr('disabled')
|
||||||
}
|
$('#available_funds_error').css('display', 'none')
|
||||||
// update bgcolor
|
|
||||||
for (i in itemTotal) {
|
|
||||||
$('#td_price_' + i).css('background-color', bgcolor);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,4 +228,6 @@ $(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
updateButtons($(document));
|
updateButtons($(document));
|
||||||
|
|
||||||
|
$(document).ready(updateBalance);
|
||||||
});
|
});
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
- title t('.title'), false
|
- title t('.title'), false
|
||||||
|
.alert.alert-error.alert-block#available_funds_error{style: ('display:none')}
|
||||||
|
= t '.invalid_funds'
|
||||||
.row-fluid
|
.row-fluid
|
||||||
.well.pull-left
|
.well.pull-left
|
||||||
= close_button :alert
|
= close_button :alert
|
||||||
|
|
|
@ -1064,6 +1064,7 @@ en:
|
||||||
units: Units
|
units: Units
|
||||||
units_full: Filled units
|
units_full: Filled units
|
||||||
units_total: Total units
|
units_total: Total units
|
||||||
|
invalid_funds: Not enough available funds
|
||||||
index:
|
index:
|
||||||
closed_orders:
|
closed_orders:
|
||||||
more: more...
|
more: more...
|
||||||
|
|
Loading…
Reference in a new issue