From 29bf81b076767efd9a1cba0b5a0b325a7385fd87 Mon Sep 17 00:00:00 2001 From: MatteoPistorello Date: Thu, 2 Dec 2021 11:46:59 +0100 Subject: [PATCH] Aggiunta gestione Abi e Cab in fase di creazione banca --- modules/banche/add.php | 110 ++++++++++++++++++++++++++++++++++++++++ modules/banche/edit.php | 6 +-- 2 files changed, 113 insertions(+), 3 deletions(-) diff --git a/modules/banche/add.php b/modules/banche/add.php index a589e6311..5744b643d 100755 --- a/modules/banche/add.php +++ b/modules/banche/add.php @@ -46,6 +46,20 @@ echo ' +
+
+ {[ "type": "select", "label": "'.tr('Nazione').'", "name": "id_nazione", "ajax-source": "nazioni" ]} +
+ +
+ {[ "type": "text", "label": "'.tr('Codice banca nazionale (ABI)').'", "name": "bank_code", "class": "alphanumeric-mask" ]} +
+ +
+ {[ "type": "text", "label": "'.tr('Codice filiale (CAB)').'", "name": "branch_code", "class": "alphanumeric-mask" ]} +
+
+
@@ -55,3 +69,99 @@ echo '
'; +?> + diff --git a/modules/banche/edit.php b/modules/banche/edit.php index 339ec0906..4e947c6fb 100644 --- a/modules/banche/edit.php +++ b/modules/banche/edit.php @@ -153,10 +153,10 @@ if (!empty($numero_documenti)) { var components = [branch_code, bank_code, account_number, check_digits, national_check_digits, id_nazione]; $(document).ready(function (){ - iban.trigger("change"); + iban.trigger("keyup"); }); - iban.change(function () { + iban.on("keyup", function () { if (!iban.isDisabled()){ let value = iban.get(); for (const component of components){ @@ -168,7 +168,7 @@ if (!empty($numero_documenti)) { }); for (const component of components){ - component.change(function () { + component.on("keyup", function () { let i = input(this); if (!i.isDisabled()) { iban.setDisabled(i.get() !== "")