rebase kfet
This commit is contained in:
parent
d559549c06
commit
9960e7e37e
1 changed files with 13 additions and 10 deletions
|
@ -34,12 +34,12 @@
|
||||||
<tr class="transfer_form" id="{{ form.prefix }}">
|
<tr class="transfer_form" id="{{ form.prefix }}">
|
||||||
<td class="from_acc_data"></td>
|
<td class="from_acc_data"></td>
|
||||||
<td class="from_acc">
|
<td class="from_acc">
|
||||||
<input type="text" name="from_acc" class="input_from_acc" autocomplete="off" spellcheck="false">
|
<input type="text" name="from_acc" class="input_from_acc" maxlength="3" autocomplete="off" spellcheck="false">
|
||||||
{{ form.from_acc }}
|
{{ form.from_acc }}
|
||||||
</td>
|
</td>
|
||||||
<td class="amount">{{ form.amount }}</td>
|
<td class="amount">{{ form.amount }}</td>
|
||||||
<td class="to_acc">
|
<td class="to_acc">
|
||||||
<input type="text" name="to_acc" class="input_to_acc" autocomplete="off" spellcheck="false">
|
<input type="text" name="to_acc" class="input_to_acc" maxlength="3" autocomplete="off" spellcheck="false">
|
||||||
{{ form.to_acc }}
|
{{ form.to_acc }}
|
||||||
</td>
|
</td>
|
||||||
<td class="to_acc_data"></td>
|
<td class="to_acc_data"></td>
|
||||||
|
@ -71,18 +71,21 @@ $(document).ready(function () {
|
||||||
var $next = $form.next('.transfer_form').find('.from_acc input');
|
var $next = $form.next('.transfer_form').find('.from_acc input');
|
||||||
}
|
}
|
||||||
var $input_id = $input.next('input');
|
var $input_id = $input.next('input');
|
||||||
|
if (isValidTrigramme(trigramme)) {
|
||||||
getAccountData(trigramme, function(data) {
|
getAccountData(trigramme, function(data) {
|
||||||
$input_id.val(data.id);
|
$input_id.val(data.id);
|
||||||
$data.text(data.name);
|
$data.text(data.name);
|
||||||
$next.focus();
|
$next.focus();
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
$input_id.val('');
|
||||||
|
$data.text('');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.input_from_acc, .input_to_acc').on('input', function() {
|
$('.input_from_acc, .input_to_acc').on('input', function() {
|
||||||
var tri = $(this).val().toUpperCase();
|
var tri = $(this).val().toUpperCase();
|
||||||
if (isValidTrigramme(tri)) {
|
|
||||||
updateAccountData(tri, $(this));
|
updateAccountData(tri, $(this));
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#transfers_form').on('submit', function(e) {
|
$('#transfers_form').on('submit', function(e) {
|
||||||
|
|
Loading…
Reference in a new issue