Skip to content
Snippets Groups Projects
Commit 559b75c4 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

New: Add hidden option MAIN_FORCE_DEFAULT_STATE_ID.

parent 303cad16
No related branches found
No related tags found
No related merge requests found
......@@ -61,7 +61,8 @@ For users:
- New: Can send an email from thirdparty card.
- New: Can cancel holidays that were previously validated.
- Fix: [bug #1022] correct margin calculation for credit notes.
- New: Can choose contact on event (action com) creation, and filtred by thirdparty
- New: Can choose contact on event (action com) creation, and filtred by thirdparty.
- New: Add hidden option MAIN_FORCE_DEFAULT_STATE_ID.
For translators:
- Qual: Normalized sort order of all languages files with english reference files.
......
......@@ -203,7 +203,7 @@ class FormCompany
* un code donnee mais dans ce cas, le champ pays differe).
* Ainsi les liens avec les departements se font sur un departement independemment de son nom.
*
* @param string $selected Code state preselected
* @param string $selected Code state preselected (mus be state id)
* @param string $country_codeid Country code or id: 0=list for all countries, otherwise country code or country rowid to show
* @param string $htmlname Id of department
* @return string String with HTML select
......@@ -257,7 +257,8 @@ class FormCompany
}
}
if ($selected > 0 && $selected == $obj->rowid)
if ((! empty($selected) && $selected == $obj->rowid)
|| (empty($selected) && ! empty($conf->global->MAIN_FORCE_DEFAULT_STATE_ID) && $conf->global->MAIN_FORCE_DEFAULT_STATE_ID == $obj->rowid))
{
$out.= '<option value="'.$obj->rowid.'" selected="selected">';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment