Fix pr-banche-bic-non-obbligatorio
This commit is contained in:
parent
ec53c0ac31
commit
0f60af2713
|
@ -102,6 +102,7 @@ switch (filter('op')) {
|
||||||
echo json_encode([
|
echo json_encode([
|
||||||
'id_nazione' => [
|
'id_nazione' => [
|
||||||
'id' => $nazione->id,
|
'id' => $nazione->id,
|
||||||
|
'iso2' => $nazione->iso2,
|
||||||
'text' => $nazione->nome,
|
'text' => $nazione->nome,
|
||||||
],
|
],
|
||||||
'bank_code' => $iban->getBankCode(),
|
'bank_code' => $iban->getBankCode(),
|
||||||
|
|
|
@ -119,10 +119,12 @@ echo '
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
compilaCampi(response);
|
compilaCampi(response);
|
||||||
|
|
||||||
if (response.id_nazione.text === "Italia"){
|
if (response.id_nazione.iso2 === "IT"){
|
||||||
bic.setRequired(false);
|
bic.setRequired(false);
|
||||||
|
$("label[for=bic]").html('<?php echo tr('BIC'); ?>');
|
||||||
} else {
|
} else {
|
||||||
bic.setRequired(true);
|
bic.setRequired(true);
|
||||||
|
$("label[for=bic]").html('<?php echo tr('BIC'); ?><span class="text-red">*</span>');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function() {
|
error: function() {
|
||||||
|
|
|
@ -192,10 +192,12 @@ if (!empty($numero_documenti)) {
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
compilaCampi(response);
|
compilaCampi(response);
|
||||||
|
|
||||||
if (response.id_nazione.text === "Italia"){
|
if (response.id_nazione.iso2 === "IT"){
|
||||||
bic.setRequired(false);
|
bic.setRequired(false);
|
||||||
|
$("label[for=bic]").html('<?php echo tr('BIC'); ?>');
|
||||||
} else {
|
} else {
|
||||||
bic.setRequired(true);
|
bic.setRequired(true);
|
||||||
|
$("label[for=bic]").html('<?php echo tr('BIC'); ?><span class="text-red">*</span>');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function() {
|
error: function() {
|
||||||
|
|
Loading…
Reference in New Issue