mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Fix reload of page
This commit is contained in:
@@ -1700,14 +1700,14 @@ if ($action == 'create') {
|
||||
} else {
|
||||
print img_picto('', 'company').$form->select_company((empty($socid) ? '' : $socid), 'socid', '(s.fournisseur=1 AND s.status=1)', 'SelectThirdParty', 1, 0, null, 0, 'minwidth175 maxwidth500 widthcentpercentminusxx');
|
||||
// reload page to retrieve customer informations
|
||||
if (!empty($conf->global->RELOAD_PAGE_ON_SUPPLIER_CHANGE)) {
|
||||
if (empty($conf->global->RELOAD_PAGE_ON_SUPPLIER_CHANGE_DISABLED)) {
|
||||
print '<script>
|
||||
$(document).ready(function() {
|
||||
$("#socid").change(function() {
|
||||
var socid = $(this).val();
|
||||
var prjid = $("#projectid").val();
|
||||
console.log("We have changed the company - Reload page");
|
||||
// reload page
|
||||
window.location.href = "'.$_SERVER["PHP_SELF"].'?action=create&socid="+socid+"&projectid="+prjid
|
||||
$("input[name=action]").val("create");
|
||||
$("form[name=add]").submit();
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
|
||||
Reference in New Issue
Block a user