Fix: Removed deprecated function

This commit is contained in:
Laurent Destailleur 2011-10-22 15:55:08 +02:00
parent ddad6700f8
commit 43bd6e1ea8
5 changed files with 12 additions and 20 deletions

View File

@ -696,7 +696,7 @@ if ($action == 'create')
// Civility
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
print $htmlcompany->select_civilite(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$object->civilite_id,'civilite_id').'</td>';
print $htmlcompany->select_civility(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$object->civilite_id,'civilite_id').'</td>';
print '</tr>';
// Lastname
@ -923,7 +923,7 @@ if ($action == 'edit')
// Civilite
print '<tr><td width="20%">'.$langs->trans("UserTitle").'</td><td width="35%">';
print $htmlcompany->select_civilite(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$object->civilite_id)."\n";
print $htmlcompany->select_civility(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$object->civilite_id)."\n";
print '</td>';
print '</tr>';

View File

@ -403,7 +403,7 @@ else
// Civility
print '<tr><td width="15%">'.$langs->trans("UserTitle").'</td><td colspan="3">';
print $formcompany->select_civilite(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$object->civilite_id);
print $formcompany->select_civility(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$object->civilite_id);
print '</td></tr>';
print '<tr><td>'.$langs->trans("PostOrFunction").'</td><td colspan="3"><input name="poste" type="text" size="50" maxlength="80" value="'.(isset($_POST["poste"])?$_POST["poste"]:$object->poste).'"></td>';
@ -582,7 +582,7 @@ else
// Civility
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
print $formcompany->select_civilite(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$object->civilite_id);
print $formcompany->select_civility(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$object->civilite_id);
print '</td></tr>';
print '<tr><td>'.$langs->trans("PostOrFunction" ).'</td><td colspan="3"><input name="poste" type="text" size="50" maxlength="80" value="'.(isset($_POST["poste"])?$_POST["poste"]:$object->poste).'"></td></tr>';

View File

@ -338,19 +338,11 @@ class FormCompany
}
/**
* \brief Retourne la liste deroulante des civilite actives
* \param selected civilite pre-selectionnee
* \param htmlname Name of HTML select combo field
*/
function select_civilite($selected='',$htmlname='civilite_id')
{
print $this->select_civility($selected,$htmlname);
}
/**
* \brief Retourne la liste deroulante des civilite actives
* \param selected civilite pre-selectionnee
* \param htmlname Name of HTML select combo field
* Return combo list with people title
*
* @param string $selected Title preselected
* @param string $htmlname Name of HTML select combo field
* @return void
*/
function select_civility($selected='',$htmlname='civilite_id')
{
@ -362,7 +354,7 @@ class FormCompany
$sql = "SELECT rowid, code, civilite, active FROM ".MAIN_DB_PREFIX."c_civilite";
$sql.= " WHERE active = 1";
dol_syslog("Form::select_civilite sql=".$sql);
dol_syslog("Form::select_civility sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{

View File

@ -398,7 +398,7 @@ else
}
// Civility
print '<tr><td>'.$langs->trans("Civility").'</td><td>';
print $formcompany->select_civilite(GETPOST('civilite_id'),'civilite_id').'</td></tr>'."\n";
print $formcompany->select_civility(GETPOST('civilite_id'),'civilite_id').'</td></tr>'."\n";
// Lastname
print '<tr><td>'.$langs->trans("Lastname").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="nom" size="40" value="'.dol_escape_htmltag(GETPOST('nom')).'"></td></tr>'."\n";
// Firstname

View File

@ -690,7 +690,7 @@ else
print '<tr class="individualline"><td>'.$langs->trans('FirstName').'</td><td><input type="text" size="30" name="prenom" value="'.$object->firstname.'"></td>';
print '<td colspan=2>&nbsp;</td></tr>';
print '<tr class="individualline"><td>'.$langs->trans("UserTitle").'</td><td>';
print $formcompany->select_civilite($contact->civilite_id).'</td>';
print $formcompany->select_civility($contact->civilite_id).'</td>';
print '<td colspan=2>&nbsp;</td></tr>';
}