Merge pull request #15080 from atm-john/12.0_fix_display_field_on_page_load

12.0 fix display field on page load & admin conf
This commit is contained in:
Laurent Destailleur 2020-10-21 19:54:45 +02:00 committed by GitHub
commit be79791561
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 7 deletions

View File

@ -104,12 +104,7 @@ $arrayAvailableType = array(
Facture::TYPE_SITUATION => $langs->trans("InvoiceSituation"), Facture::TYPE_SITUATION => $langs->trans("InvoiceSituation"),
Facture::TYPE_STANDARD.'+'.Facture::TYPE_SITUATION => $langs->trans("InvoiceSituation").' + '.$langs->trans("InvoiceStandard"), Facture::TYPE_STANDARD.'+'.Facture::TYPE_SITUATION => $langs->trans("InvoiceSituation").' + '.$langs->trans("InvoiceStandard"),
); );
$selected = array(); $selected = $conf->global->$confkey;
$implodeglue = '+';
if (!empty($conf->global->{$confkey}) && !is_array($conf->global->{$confkey})) {
$selected = explode('+', $conf->global->{$confkey});
}
$curentInput = (empty($inputCount) ? 1 : ($inputCount + 1)); $curentInput = (empty($inputCount) ? 1 : ($inputCount + 1));
$formSelectInvoiceType = $form->selectarray('value'.$curentInput, $arrayAvailableType, $selected, 1); $formSelectInvoiceType = $form->selectarray('value'.$curentInput, $arrayAvailableType, $selected, 1);
_printInputFormPart($confkey, $langs->trans('AllowedInvoiceForRetainedWarranty'), '', array(), $formSelectInvoiceType); _printInputFormPart($confkey, $langs->trans('AllowedInvoiceForRetainedWarranty'), '', array(), $formSelectInvoiceType);

View File

@ -3497,7 +3497,7 @@ if ($action == 'create')
} }
}); });
$("[name=\'type\']").trigger("change"); $("[name=\'type\']:checked").trigger("change");
}); });
</script>'; </script>';
} }