diff --git a/kfet/templates/kfet/transfers_create.html b/kfet/templates/kfet/transfers_create.html
index 294db1e5..83a09762 100644
--- a/kfet/templates/kfet/transfers_create.html
+++ b/kfet/templates/kfet/transfers_create.html
@@ -34,12 +34,12 @@
|
-
+
{{ form.from_acc }}
|
{{ form.amount }} |
-
+
{{ form.to_acc }}
|
|
@@ -71,18 +71,21 @@ $(document).ready(function () {
var $next = $form.next('.transfer_form').find('.from_acc input');
}
var $input_id = $input.next('input');
- getAccountData(trigramme, function(data) {
- $input_id.val(data.id);
- $data.text(data.name);
- $next.focus();
- });
+ if (isValidTrigramme(trigramme)) {
+ getAccountData(trigramme, function(data) {
+ $input_id.val(data.id);
+ $data.text(data.name);
+ $next.focus();
+ });
+ } else {
+ $input_id.val('');
+ $data.text('');
+ }
}
$('.input_from_acc, .input_to_acc').on('input', function() {
var tri = $(this).val().toUpperCase();
- if (isValidTrigramme(tri)) {
- updateAccountData(tri, $(this));
- }
+ updateAccountData(tri, $(this));
});
$('#transfers_form').on('submit', function(e) {