Fix inconsistent options
This commit is contained in:
parent
bb2a9f9d0e
commit
807c77f754
@ -432,29 +432,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0)
|
||||
}
|
||||
}
|
||||
|
||||
// AGENDA_SHOW_LINKED_OBJECT
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>'."\n";
|
||||
print '<td>'.$langs->trans("AGENDA_SHOW_LINKED_OBJECT").'</td>'."\n";
|
||||
print '<td align="center"> </td>'."\n";
|
||||
print '<td align="right">'."\n";
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
print ajax_constantonoff('AGENDA_SHOW_LINKED_OBJECT');
|
||||
}
|
||||
else
|
||||
{
|
||||
if (empty($conf->global->AGENDA_SHOW_LINKED_OBJECT))
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_SHOW_LINKED_OBJECT">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_SHOW_LINKED_OBJECT">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||
}
|
||||
}
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
@ -1114,7 +1114,7 @@ if ($id > 0)
|
||||
$events[]=array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php?showempty=1',1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled'));
|
||||
// TODO Refresh also list of project if $conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY not defined with list linked to socid ?
|
||||
// FIXME If we change company, we may get a project that does not match
|
||||
print $form->select_company($object->socid, 'socid', '', 'SelectThirdParty', 1, 0, $events, 0);
|
||||
print $form->select_company($object->socid, 'socid', '', 'SelectThirdParty', 1, 0, $events, 0, 'minwidth200');
|
||||
print '</div>';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -160,7 +160,6 @@ if ($action =='delete_action')
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
@ -580,6 +580,12 @@ class Conf
|
||||
|
||||
if (empty($this->global->MAIN_SIZE_SHORTLIST_LIMIT)) $this->global->MAIN_SIZE_SHORTLIST_LIMIT=3;
|
||||
|
||||
// Save inconsistent option
|
||||
if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && $conf->global->AGENDA_DEFAULT_FILTER_TYPE == 'AC_NON_AUTO')
|
||||
{
|
||||
$conf->global->AGENDA_DEFAULT_FILTER_TYPE='0'; // 'AC_NON_AUTO' does not exists when AGENDA_DEFAULT_FILTER_TYPE is not on.
|
||||
}
|
||||
|
||||
// For backward compatibility
|
||||
if (isset($this->product)) $this->produit=$this->product;
|
||||
if (isset($this->facture)) $this->invoice=$this->facture;
|
||||
|
||||
@ -83,11 +83,11 @@ else
|
||||
sort($match);
|
||||
$id = (! empty($match[0]) ? $match[0] : '');
|
||||
|
||||
if (! GETPOST($htmlname) && ! GETPOST($id)) return;
|
||||
|
||||
// When used from jQuery, the search term is added as GET param "term".
|
||||
$searchkey=(GETPOST($id)?GETPOST($id):(GETPOST($htmlname)?GETPOST($htmlname):''));
|
||||
$searchkey=(($id && GETPOST($id, 'alpha'))?GETPOST($id, 'alpha'):(($htmlname && GETPOST($htmlname, 'alpha'))?GETPOST($htmlname, 'alpha'):''));
|
||||
|
||||
if (! $searchkey) return;
|
||||
|
||||
$form = new Form($db);
|
||||
$arrayresult=$form->select_thirdparty_list(0,$htmlname,$filter,1,0,0,null,$searchkey,$outjson);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user