FIX Load chart of account only if we click or select button "Load chart"
This commit is contained in:
parent
80c1a92872
commit
edfedbb818
@ -101,7 +101,7 @@ if (empty($reshook))
|
|||||||
$search_array_options=array();
|
$search_array_options=array();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GETPOST('change_chart', 'alpha') && GETPOST('valid_change_chart', 'int'))
|
if (GETPOST('change_chart', 'alpha') && (GETPOST('valid_change_chart', 'int') || empty($conf->use_javascript_ajax)))
|
||||||
{
|
{
|
||||||
$chartofaccounts = GETPOST('chartofaccounts', 'int');
|
$chartofaccounts = GETPOST('chartofaccounts', 'int');
|
||||||
|
|
||||||
@ -237,6 +237,8 @@ if ($resql)
|
|||||||
if ($search_pcgsubtype) $param.= '&search_pcgsubtype='.urlencode($search_pcgsubtype);
|
if ($search_pcgsubtype) $param.= '&search_pcgsubtype='.urlencode($search_pcgsubtype);
|
||||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||||
|
|
||||||
|
if (! empty($conf->use_javascript_ajax))
|
||||||
|
{
|
||||||
print '<!-- Add javascript to update a flag when we select "Change plan" -->
|
print '<!-- Add javascript to update a flag when we select "Change plan" -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
@ -252,6 +254,7 @@ if ($resql)
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>';
|
</script>';
|
||||||
|
}
|
||||||
|
|
||||||
print '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
print '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user