";
- print "propalid\">".img_object($langs->trans("ShowPropal"),"propal")." ".$objp->ref." \n";
+ print ''.img_object($langs->trans("ShowPropal"),"propal").' '.$objp->ref.' '."\n";
if ( ($db->jdate($objp->dp) < ($now - $conf->propal->cloture->warning_delay)) && $objp->fk_statut == 1 )
{
print " ".img_warning();
@@ -533,7 +535,7 @@ if ($socid > 0)
$sql.= " c.date_commande as dc";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c";
$sql.= " WHERE c.fk_soc = s.rowid ";
- $sql.= " AND s.rowid = ".$objsoc->id;
+ $sql.= " AND s.rowid = ".$object->id;
$sql.= " ORDER BY c.date_commande DESC";
$resql=$db->query($sql);
@@ -547,8 +549,8 @@ if ($socid > 0)
print '';
print '';
- print ''.$langs->trans("LastOrders",($num<=$MAXLIST?"":$MAXLIST)).' '.$langs->trans("AllOrders").' ('.$num.') ';
- print ''.img_picto($langs->trans("Statistics"),'stats').' ';
+ print ' ';
print ' ';
}
@@ -585,7 +587,7 @@ if ($socid > 0)
$sql = "SELECT s.nom, s.rowid, c.rowid as id, c.ref as ref, c.statut, c.datec as dc";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c";
$sql .= " WHERE c.fk_soc = s.rowid ";
- $sql .= " AND s.rowid = ".$objsoc->id;
+ $sql .= " AND s.rowid = ".$object->id;
$sql .= " ORDER BY c.datec DESC";
$resql=$db->query($sql);
@@ -599,7 +601,7 @@ if ($socid > 0)
print '';
print ' ';
+ print ''.$langs->trans("AllContracts").' ('.$num.')
';
print ' ';
}
$i = 0;
@@ -642,7 +644,7 @@ if ($socid > 0)
$sql = "SELECT s.nom, s.rowid, f.rowid as id, f.ref, f.duree as duration, f.datei as startdate";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."fichinter as f";
$sql .= " WHERE f.fk_soc = s.rowid";
- $sql .= " AND s.rowid = ".$objsoc->id;
+ $sql .= " AND s.rowid = ".$object->id;
$sql .= " ORDER BY f.tms DESC";
$fichinter_static=new Fichinter($db);
@@ -657,7 +659,7 @@ if ($socid > 0)
print '';
print '';
- print ' ';
+ print ' ';
print ' ';
$var=!$var;
}
@@ -699,7 +701,7 @@ if ($socid > 0)
$sql.= ' SUM(pf.amount) as am';
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON f.rowid=pf.fk_facture';
- $sql.= " WHERE f.fk_soc = s.rowid AND s.rowid = ".$objsoc->id;
+ $sql.= " WHERE f.fk_soc = s.rowid AND s.rowid = ".$object->id;
$sql.= ' GROUP BY f.rowid, f.facnumber, f.type, f.amount, f.total, f.total_ttc,';
$sql.= ' f.datef, f.datec, f.paye, f.fk_statut,';
$sql.= ' s.nom, s.rowid';
@@ -717,8 +719,8 @@ if ($socid > 0)
$tableaushown=1;
print '';
- print ''.$langs->trans("LastCustomersBills",($num<=$MAXLIST?"":$MAXLIST)).' '.$langs->trans("AllBills").' ('.$num.') ';
- print ''.img_picto($langs->trans("Statistics"),'stats').' ';
+ print ' ';
print ' ';
}
@@ -772,25 +774,25 @@ if ($socid > 0)
if ($conf->propal->enabled && $user->rights->propale->creer)
{
$langs->load("propal");
- print ''.$langs->trans("AddProp").' ';
+ print ''.$langs->trans("AddProp").' ';
}
if ($conf->commande->enabled && $user->rights->commande->creer)
{
$langs->load("orders");
- print ''.$langs->trans("AddOrder").' ';
+ print ''.$langs->trans("AddOrder").' ';
}
if ($user->rights->contrat->creer)
{
$langs->load("contracts");
- print ''.$langs->trans("AddContract").' ';
+ print ''.$langs->trans("AddContract").' ';
}
if ($conf->ficheinter->enabled && $user->rights->ficheinter->creer)
{
$langs->load("fichinter");
- print ''.$langs->trans("AddIntervention").' ';
+ print ''.$langs->trans("AddIntervention").' ';
}
// Add invoice
@@ -799,7 +801,7 @@ if ($socid > 0)
if ($conf->deplacement->enabled)
{
$langs->load("trips");
- print ''.$langs->trans("AddTrip").' ';
+ print ''.$langs->trans("AddTrip").' ';
}
if ($conf->facture->enabled)
@@ -807,7 +809,7 @@ if ($socid > 0)
if ($user->rights->facture->creer)
{
$langs->load("bills");
- if ($objsoc->client != 0) print ''.$langs->trans("AddBill").' ';
+ if ($object->client != 0) print ''.$langs->trans("AddBill").' ';
else print ''.$langs->trans("AddBill").' ';
}
else
@@ -822,7 +824,7 @@ if ($socid > 0)
{
if ($user->rights->agenda->myactions->create)
{
- print ''.$langs->trans("AddAction").' ';
+ print ''.$langs->trans("AddAction").' ';
}
else
{
@@ -832,7 +834,7 @@ if ($socid > 0)
/*if ($user->rights->societe->contact->creer)
{
- print ''.$langs->trans("AddContact").' ';
+ print ''.$langs->trans("AddContact").' ';
}*/
print '';
@@ -842,16 +844,16 @@ if ($socid > 0)
{
print ' ';
// List of contacts
- show_contacts($conf,$langs,$db,$objsoc,$_SERVER["PHP_SELF"].'?socid='.$objsoc->id);
+ show_contacts($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?socid='.$object->id);
}
if (! empty($conf->global->MAIN_REPEATTASKONEACHTAB))
{
// List of todo actions
- show_actions_todo($conf,$langs,$db,$objsoc);
+ show_actions_todo($conf,$langs,$db,$object);
// List of done actions
- show_actions_done($conf,$langs,$db,$objsoc);
+ show_actions_done($conf,$langs,$db,$object);
}
}
else
diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index 234ffddbfcd..b220e311ed7 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -78,7 +78,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'del_bookmark')
$now=dol_now();
-$html = new Form($db);
+$form = new Form($db);
$formfile = new FormFile($db);
$companystatic=new Societe($db);
if ($conf->propal->enabled) $propalstatic=new Propal($db);
diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php
index 8b4516bfd63..b4d9aa44d4d 100644
--- a/htdocs/comm/mailing/cibles.php
+++ b/htdocs/comm/mailing/cibles.php
@@ -158,7 +158,7 @@ if ($_POST["button_removefilter"])
llxHeader('',$langs->trans("Mailing"),'EN:Module_EMailing|FR:Module_Mailing|ES:Módulo_Mailing');
-$html = new Form($db);
+$form = new Form($db);
$mil = new Mailing($db);
@@ -173,7 +173,7 @@ if ($mil->fetch($_REQUEST["id"]) >= 0)
print ''.$langs->trans("Ref").' ';
print '';
- print $html->showrefnav($mil,'id');
+ print $form->showrefnav($mil,'id');
print ' ';
print ''.$langs->trans("MailTitle").' '.$mil->titre.' ';
@@ -195,7 +195,7 @@ if ($mil->fetch($_REQUEST["id"]) >= 0)
if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
{
$text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
- print $html->textwithpicto($nbemail,$text,1,'warning');
+ print $form->textwithpicto($nbemail,$text,1,'warning');
}
else
{
diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php
index 6628b385e9a..870e5833782 100644
--- a/htdocs/comm/mailing/fiche.php
+++ b/htdocs/comm/mailing/fiche.php
@@ -596,7 +596,7 @@ if (! empty($_POST["cancel"]))
$help_url='EN:Module_EMailing|FR:Module_Mailing|ES:Módulo_Mailing';
llxHeader('',$langs->trans("Mailing"),$help_url);
-$html = new Form($db);
+$form = new Form($db);
$htmlother = new FormOther($db);
$mil = new Mailing($db);
@@ -658,21 +658,21 @@ else
// Confirmation de la validation du mailing
if ($_GET["action"] == 'valid')
{
- $ret=$html->form_confirm($_SERVER["PHP_SELF"]."?id=".$mil->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1);
+ $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$mil->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1);
if ($ret == 'html') print ' ';
}
// Confirm reset
if ($_GET["action"] == 'reset')
{
- $ret=$html->form_confirm($_SERVER["PHP_SELF"]."?id=".$mil->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$mil->ref),"confirm_reset",'','',2);
+ $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$mil->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$mil->ref),"confirm_reset",'','',2);
if ($ret == 'html') print ' ';
}
// Confirm delete
if ($_GET["action"] == 'delete')
{
- $ret=$html->form_confirm($_SERVER["PHP_SELF"]."?id=".$mil->id,$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete",'','',1);
+ $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$mil->id,$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete",'','',1);
if ($ret == 'html') print ' ';
}
@@ -709,7 +709,7 @@ else
}
$text.=$langs->trans('ConfirmSendingEmailing').' ';
$text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
- $ret=$html->form_confirm($_SERVER['PHP_SELF'].'?id='.$_REQUEST['id'],$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,260);
+ $ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$_REQUEST['id'],$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,260);
if ($ret == 'html') print ' ';
}
}
@@ -718,22 +718,22 @@ else
print ''.$langs->trans("Ref").' ';
print '';
- print $html->showrefnav($mil,'id');
+ print $form->showrefnav($mil,'id');
print ' ';
// Description
- print ''.$html->editfieldkey("MailTitle",'desc',$mil->titre,'id',$mil->id,$user->rights->mailing->creer).' ';
- print $html->editfieldval("MailTitle",'desc',$mil->titre,'id',$mil->id,$user->rights->mailing->creer);
+ print ' '.$form->editfieldkey("MailTitle",'desc',$mil->titre,$mil,$user->rights->mailing->creer).' ';
+ print $form->editfieldval("MailTitle",'desc',$mil->titre,$mil,$user->rights->mailing->creer);
print ' ';
// From
- print ''.$html->editfieldkey("MailFrom",'from',$mil->email_from,'id',$mil->id,$user->rights->mailing->creer && $mil->statut < 3,'email').' ';
- print $html->editfieldval("MailFrom",'from',$mil->email_from,'id',$mil->id,$user->rights->mailing->creer && $mil->statut < 3,'email');
+ print ' '.$form->editfieldkey("MailFrom",'from',$mil->email_from,$mil,$user->rights->mailing->creer && $mil->statut < 3,'email').' ';
+ print $form->editfieldval("MailFrom",'from',$mil->email_from,$mil,$user->rights->mailing->creer && $mil->statut < 3,'email');
print ' ';
// Errors to
- print ''.$html->editfieldkey("MailErrorsTo",'errorsto',$mil->email_errorsto,'id',$mil->id,$user->rights->mailing->creer && $mil->statut < 3,'email').' ';
- print $html->editfieldval("MailErrorsTo",'errorsto',$mil->email_errorsto,'id',$mil->id,$user->rights->mailing->creer && $mil->statut < 3,'email');
+ print ' '.$form->editfieldkey("MailErrorsTo",'errorsto',$mil->email_errorsto,$mil,$user->rights->mailing->creer && $mil->statut < 3,'email').' ';
+ print $form->editfieldval("MailErrorsTo",'errorsto',$mil->email_errorsto,$mil,$user->rights->mailing->creer && $mil->statut < 3,'email');
print ' ';
// Status
@@ -749,12 +749,12 @@ else
if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0)
{
$text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
- print $html->textwithpicto($nbemail,$text,1,'warning');
+ print $form->textwithpicto($nbemail,$text,1,'warning');
}
else
{
$text=$langs->trans('NotEnoughPermissions');
- print $html->textwithpicto($nbemail,$text,1,'warning');
+ print $form->textwithpicto($nbemail,$text,1,'warning');
}
}
@@ -779,7 +779,7 @@ else
array('type' => 'checkbox', 'name' => 'clone_receivers', 'label' => $langs->trans("CloneReceivers").' ('.$langs->trans("FeatureNotYetAvailable").')', 'value' => 0, 'disabled' => true)
);
// Paiement incomplet. On demande si motif = escompte ou autre
- $html->form_confirm($_SERVER["PHP_SELF"].'?id='.$mil->id,$langs->trans('CloneEMailing'),$langs->trans('ConfirmCloneEMailing',$mil->ref),'confirm_clone',$formquestion,'yes');
+ $form->form_confirm($_SERVER["PHP_SELF"].'?id='.$mil->id,$langs->trans('CloneEMailing'),$langs->trans('ConfirmCloneEMailing',$mil->ref),'confirm_clone',$formquestion,'yes');
print ' ';
}
@@ -966,7 +966,7 @@ else
if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && is_numeric($nbemail) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
{
$text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
- print $html->textwithpicto($nbemail,$text,1,'warning');
+ print $form->textwithpicto($nbemail,$text,1,'warning');
}
else
{
diff --git a/htdocs/comm/mailing/info.php b/htdocs/comm/mailing/info.php
index 632120ac5ec..685e88a16de 100644
--- a/htdocs/comm/mailing/info.php
+++ b/htdocs/comm/mailing/info.php
@@ -41,7 +41,7 @@ accessforbidden();
llxHeader('',$langs->trans("Mailing"),'EN:Module_EMailing|FR:Module_Mailing|ES:Módulo_Mailing');
-$html = new Form($db);
+$form = new Form($db);
$mil = new Mailing($db);
diff --git a/htdocs/comm/mailing/liste.php b/htdocs/comm/mailing/liste.php
index c8a6954b443..967d2903517 100644
--- a/htdocs/comm/mailing/liste.php
+++ b/htdocs/comm/mailing/liste.php
@@ -59,7 +59,7 @@ $filteremail=$_REQUEST["filteremail"]?$_REQUEST["filteremail"]:'';
llxHeader('',$langs->trans("Mailing"),'EN:Module_EMailing|FR:Module_Mailing|ES:Módulo_Mailing');
-$html = new Form($db);
+$form = new Form($db);
if ($filteremail)
{
@@ -158,7 +158,7 @@ if ($result)
if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
{
$text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
- print $html->textwithpicto($nbemail,$text,1,'warning');
+ print $form->textwithpicto($nbemail,$text,1,'warning');
}
else
{
diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index 2cb0bafa50f..833d7e80443 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -987,7 +987,7 @@ if ($action == 'down' && $user->rights->propale->creer)
llxHeader('',$langs->trans('Proposal'),'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos');
-$html = new Form($db);
+$form = new Form($db);
$htmlother = new FormOther($db);
$formfile = new FormFile($db);
$companystatic=new Societe($db);
@@ -1023,10 +1023,10 @@ if ($id > 0 || ! empty($ref))
//'text' => $langs->trans("ConfirmClone"),
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
- array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $html->select_company(GETPOST('socid'),'socid','(s.client=1 OR s.client=3)'))
+ array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid'),'socid','(s.client=1 OR s.client=3)'))
);
// Paiement incomplet. On demande si motif = escompte ou autre
- $formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('ClonePropal'),$langs->trans('ConfirmClonePropal',$object->ref),'confirm_clone',$formquestion,'yes',1);
+ $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('ClonePropal'),$langs->trans('ConfirmClonePropal',$object->ref),'confirm_clone',$formquestion,'yes',1);
}
/*
@@ -1034,7 +1034,7 @@ if ($id > 0 || ! empty($ref))
*/
if ($action == 'delete')
{
- $formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp'), 'confirm_delete','',0,1);
+ $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp'), 'confirm_delete','',0,1);
}
/*
@@ -1042,7 +1042,7 @@ if ($id > 0 || ! empty($ref))
*/
if ($action == 'ask_deleteline')
{
- $formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline','',0,1);
+ $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline','',0,1);
}
/*
@@ -1077,7 +1077,7 @@ if ($id > 0 || ! empty($ref))
$text.=$notify->confirmMessage('NOTIFY_VAL_PROPAL',$object->socid);
}
- if (! $error) $formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate','',0,1);
+ if (! $error) $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate','',0,1);
}
if (! $formconfirm)
@@ -1096,7 +1096,7 @@ if ($id > 0 || ! empty($ref))
// Ref
print ''.$langs->trans('Ref').' ';
- print $html->showrefnav($object,'ref',$linkback,1,'ref','ref','');
+ print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','');
print ' ';
// Ref client
@@ -1149,7 +1149,7 @@ if ($id > 0 || ! empty($ref))
// Remise dispo de type non avoir
$filter='fk_facture_source IS NULL';
print ' ';
- $html->form_remise_dispo($_SERVER["PHP_SELF"].'?id='.$object->id,0,'remise_id',$soc->id,$absolute_discount,$filter);
+ $form->form_remise_dispo($_SERVER["PHP_SELF"].'?id='.$object->id,0,'remise_id',$soc->id,$absolute_discount,$filter);
}
}
if ($absolute_creditnote)
@@ -1173,7 +1173,7 @@ if ($id > 0 || ! empty($ref))
print '';
}
@@ -1218,7 +1218,7 @@ if ($id > 0 || ! empty($ref))
print '';
}
@@ -1247,11 +1247,11 @@ if ($id > 0 || ! empty($ref))
print '';
if ($action == 'editconditions')
{
- $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->cond_reglement_id,'cond_reglement_id');
+ $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->cond_reglement_id,'cond_reglement_id');
}
else
{
- $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->cond_reglement_id,'none');
+ $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->cond_reglement_id,'none');
}
print ' ';
print '';
@@ -1270,7 +1270,7 @@ if ($id > 0 || ! empty($ref))
print '';
}
@@ -1295,11 +1295,11 @@ if ($id > 0 || ! empty($ref))
if ($action == 'editdelivery_address')
{
- $html->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid'),'fk_address','propal',$object->id);
+ $form->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid'),'fk_address','propal',$object->id);
}
else
{
- $html->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid'),'none','propal',$object->id);
+ $form->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid'),'none','propal',$object->id);
}
print '';
}
@@ -1315,11 +1315,11 @@ if ($id > 0 || ! empty($ref))
print '';
if ($action == 'editavailability')
{
- $html->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id,$object->availability_id,'availability_id',1);
+ $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id,$object->availability_id,'availability_id',1);
}
else
{
- $html->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id,$object->availability_id,'none',1);
+ $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id,$object->availability_id,'none',1);
}
print ' ';
@@ -1336,11 +1336,11 @@ if ($id > 0 || ! empty($ref))
//print $object->demand_reason_id;
if ($action == 'editdemandreason')
{
- $html->form_demand_reason($_SERVER['PHP_SELF'].'?id='.$object->id,$object->demand_reason_id,'demand_reason_id',1);
+ $form->form_demand_reason($_SERVER['PHP_SELF'].'?id='.$object->id,$object->demand_reason_id,'demand_reason_id',1);
}
else
{
- $html->form_demand_reason($_SERVER['PHP_SELF'].'?id='.$object->id,$object->demand_reason_id,'none');
+ $form->form_demand_reason($_SERVER['PHP_SELF'].'?id='.$object->id,$object->demand_reason_id,'none');
}
print '';
@@ -1357,11 +1357,11 @@ if ($id > 0 || ! empty($ref))
print '';
if ($action == 'editmode')
{
- $html->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->mode_reglement_id,'mode_reglement_id');
+ $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->mode_reglement_id,'mode_reglement_id');
}
else
{
- $html->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->mode_reglement_id,'none');
+ $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->mode_reglement_id,'none');
}
print ' ';
@@ -1379,11 +1379,11 @@ if ($id > 0 || ! empty($ref))
print '';
if ($action == 'classify')
{
- $html->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'projectid');
+ $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'projectid');
}
else
{
- $html->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none');
+ $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none');
}
print ' ';
}
@@ -1837,7 +1837,7 @@ else
print '';
print ' ';
print '';
- $html->select_propal_statut($viewstatut,1);
+ $form->select_propal_statut($viewstatut,1);
print ' ';
print ' ';
print ' ';
diff --git a/htdocs/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php
index 0efde17b23c..59213b04692 100644
--- a/htdocs/comm/propal/apercu.php
+++ b/htdocs/comm/propal/apercu.php
@@ -49,7 +49,7 @@ $result = restrictedArea($user, 'propale', $id, 'propal');
llxHeader();
-$html = new Form($db);
+$form = new Form($db);
/* *************************************************************************** */
/* */
diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php
index 9ba449fee5c..b6fe67d4122 100644
--- a/htdocs/comm/propal/contact.php
+++ b/htdocs/comm/propal/contact.php
@@ -118,7 +118,7 @@ if ($action == 'deleteline' && $user->rights->propale->creer)
llxHeader('', $langs->trans("Proposal"), "Propal");
-$html = new Form($db);
+$form = new Form($db);
$formcompany= new FormCompany($db);
$contactstatic=new Contact($db);
$userstatic=new User($db);
@@ -155,7 +155,7 @@ if ($id > 0 || ! empty($ref))
// Ref
print ''.$langs->trans('Ref').' ';
- print $html->showrefnav($propal,'ref',$linkback,1,'ref','ref','');
+ print $form->showrefnav($propal,'ref',$linkback,1,'ref','ref','');
print ' ';
// Ref client
@@ -222,7 +222,7 @@ if ($id > 0 || ! empty($ref))
print '';
// On recupere les id des users deja selectionnes
//$userAlreadySelected = $propal->getListContactId('internal'); // On ne doit pas desactiver un contact deja selectionne car on doit pouvoir le selectionner une deuxieme fois pour un autre type
- $html->select_users($user->id,'contactid',0,$userAlreadySelected);
+ $form->select_users($user->id,'contactid',0,$userAlreadySelected);
print ' ';
print '';
$formcompany->selectTypeContact($propal, '', 'type','internal');
@@ -252,7 +252,7 @@ if ($id > 0 || ! empty($ref))
print ' ';
print '';
- $nbofcontacts=$html->select_contacts($selectedCompany, '', 'contactid');
+ $nbofcontacts=$form->select_contacts($selectedCompany, '', 'contactid');
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
print ' ';
print '';
diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php
index 05860909553..93eb16b0762 100644
--- a/htdocs/comm/propal/document.php
+++ b/htdocs/comm/propal/document.php
@@ -120,7 +120,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
llxHeader();
-$html = new Form($db);
+$form = new Form($db);
if ($id > 0 || ! empty($ref))
{
@@ -149,7 +149,7 @@ if ($id > 0 || ! empty($ref))
// Ref
print ' '.$langs->trans('Ref').' ';
- print $html->showrefnav($object,'ref',$linkback,1,'ref','ref','');
+ print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','');
print ' ';
// Ref client
@@ -181,7 +181,7 @@ if ($id > 0 || ! empty($ref))
*/
if ($action == 'delete')
{
- $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
+ $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
if ($ret == 'html') print ' ';
}
diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php
index bb577f66daa..ae58515b3a4 100644
--- a/htdocs/comm/propal/index.php
+++ b/htdocs/comm/propal/index.php
@@ -47,7 +47,7 @@ if ($user->societe_id > 0)
*/
$propalstatic=new Propal($db);
-$html = new Form($db);
+$form = new Form($db);
$formfile = new FormFile($db);
$help_url="EN:Module_Commercial_Proposals|FR:Module_Propositions_commerciales|ES:Módulo Presupuestos";
diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php
index 18fb187033d..646cdb41358 100644
--- a/htdocs/comm/propal/note.php
+++ b/htdocs/comm/propal/note.php
@@ -90,7 +90,7 @@ if ($_POST['action'] == 'update' && $user->rights->propale->creer)
llxHeader();
-$html = new Form($db);
+$form = new Form($db);
$id = $_GET["id"];
$ref= $_GET["ref"];
@@ -115,7 +115,7 @@ if ($id > 0 || ! empty($ref))
// Ref
print ''.$langs->trans('Ref').' ';
- print $html->showrefnav($propal,'ref',$linkback,1,'ref','ref','');
+ print $form->showrefnav($propal,'ref',$linkback,1,'ref','ref','');
print ' ';
// Ref client
diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php
index 20708e15207..a76fd8c2786 100644
--- a/htdocs/commande/apercu.php
+++ b/htdocs/commande/apercu.php
@@ -52,7 +52,7 @@ $result=restrictedArea($user,'commande',$id,'');
llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
-$html = new Form($db);
+$form = new Form($db);
/* *************************************************************************** */
/* */
diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php
index ebfb90552e7..94dee98896b 100644
--- a/htdocs/commande/contact.php
+++ b/htdocs/commande/contact.php
@@ -113,7 +113,7 @@ if ($_GET["action"] == 'deleteline' && $user->rights->commande->creer)
llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
-$html = new Form($db);
+$form = new Form($db);
$formcompany = new FormCompany($db);
$contactstatic=new Contact($db);
$userstatic=new User($db);
@@ -149,7 +149,7 @@ if ($id > 0 || ! empty($ref))
// Ref
print ''.$langs->trans("Ref").' ';
- print $html->showrefnav($commande,'ref','',1,'ref','ref');
+ print $form->showrefnav($commande,'ref','',1,'ref','ref');
print " ";
// Ref commande client
@@ -214,7 +214,7 @@ if ($id > 0 || ! empty($ref))
print '';
//$userAlreadySelected = $commande->getListContactId('internal'); // On ne doit pas desactiver un contact deja selectionne car on doit pouvoir le selectionner une deuxieme fois pour un autre type
- $html->select_users($user->id,'contactid',0,$userAlreadySelected);
+ $form->select_users($user->id,'contactid',0,$userAlreadySelected);
print ' ';
print '';
$formcompany->selectTypeContact($commande, '', 'type','internal');
@@ -244,7 +244,7 @@ if ($id > 0 || ! empty($ref))
print ' ';
print '';
- $nbofcontacts=$html->select_contacts($selectedCompany, '', 'contactid');
+ $nbofcontacts=$form->select_contacts($selectedCompany, '', 'contactid');
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
print ' ';
print '';
diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php
index 5c2e43f0431..2853ae6b0c3 100644
--- a/htdocs/commande/document.php
+++ b/htdocs/commande/document.php
@@ -123,7 +123,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
-$html = new Form($db);
+$form = new Form($db);
if ($id > 0 || ! empty($ref))
{
@@ -150,7 +150,7 @@ if ($id > 0 || ! empty($ref))
// Ref
print ' '.$langs->trans('Ref').' ';
- print $html->showrefnav($object,'ref','',1,'ref','ref');
+ print $form->showrefnav($object,'ref','',1,'ref','ref');
print ' ';
print ''.$langs->trans('Company').' '.$object->thirdparty->getNomUrl(1).' ';
@@ -166,7 +166,7 @@ if ($id > 0 || ! empty($ref))
*/
if ($action == 'delete')
{
- $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
+ $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
if ($ret == 'html') print ' ';
}
diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index 3441852b40d..19bd0408673 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -1111,7 +1111,7 @@ if ($action == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_P
llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
-$html = new Form($db);
+$form = new Form($db);
$formfile = new FormFile($db);
$formorder = new FormOrder($db);
@@ -1217,7 +1217,7 @@ if ($action == 'create' && $user->rights->commande->creer)
* Contact de la commande
*/
print "".$langs->trans("DefaultContact").' ';
- $html->select_contacts($soc->id,$setcontact,'contactidp',1,$srccontactslist);
+ $form->select_contacts($soc->id,$setcontact,'contactidp',1,$srccontactslist);
print ' ';
// Ligne info remises tiers
@@ -1233,7 +1233,7 @@ if ($action == 'create' && $user->rights->commande->creer)
// Date
print ''.$langs->trans('Date').' ';
- $html->select_date('','re','','','',"crea_commande",1,1);
+ $form->select_date('','re','','','',"crea_commande",1,1);
print ' ';
// Date de livraison
@@ -1246,37 +1246,37 @@ if ($action == 'create' && $user->rights->commande->creer)
{
$datedelivery=empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0;
}
- $html->select_date($datedelivery,'liv_','','','',"crea_commande",1,1);
+ $form->select_date($datedelivery,'liv_','','','',"crea_commande",1,1);
print "";
// Delivery address
if ($conf->global->COMMANDE_ADD_DELIVERY_ADDRESS)
{
- // Link to edit: $html->form_address($_SERVER['PHP_SELF'].'?action=create','',$soc->id,'adresse_livraison_id','commande','');
+ // Link to edit: $form->form_address($_SERVER['PHP_SELF'].'?action=create','',$soc->id,'adresse_livraison_id','commande','');
print ''.$langs->trans('DeliveryAddress').' ';
- $numaddress = $html->select_address($soc->fk_delivery_address, $socid,'fk_address',1);
+ $numaddress = $form->select_address($soc->fk_delivery_address, $socid,'fk_address',1);
print ' '.$langs->trans("AddAddress").' ';
print ' ';
}
// Conditions de reglement
print ''.$langs->trans('PaymentConditionsShort').' ';
- $html->select_conditions_paiements($soc->cond_reglement,'cond_reglement_id',-1,1);
+ $form->select_conditions_paiements($soc->cond_reglement,'cond_reglement_id',-1,1);
print ' ';
// Mode de reglement
print ''.$langs->trans('PaymentMode').' ';
- $html->select_types_paiements($soc->mode_reglement,'mode_reglement_id');
+ $form->select_types_paiements($soc->mode_reglement,'mode_reglement_id');
print ' ';
// Delivery delay
print ''.$langs->trans('AvailabilityPeriod').' ';
- $html->select_availability($propal->availability,'availability_id','',1);
+ $form->select_availability($propal->availability,'availability_id','',1);
print ' ';
// What trigger creation
print ''.$langs->trans('Source').' ';
- $html->select_demand_reason((GETPOST("origin")=='propal'?'SRC_COMM':''),'demand_reason_id','',1);
+ $form->select_demand_reason((GETPOST("origin")=='propal'?'SRC_COMM':''),'demand_reason_id','',1);
print ' ';
// Project
@@ -1303,7 +1303,7 @@ if ($action == 'create' && $user->rights->commande->creer)
// pdf
include_once(DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php');
$liste=ModelePDFCommandes::liste_modeles($db);
- print $html->selectarray('model',$liste,$conf->global->COMMANDE_ADDON_PDF);
+ print $form->selectarray('model',$liste,$conf->global->COMMANDE_ADDON_PDF);
print "";
// Note publique
@@ -1382,9 +1382,9 @@ if ($action == 'create' && $user->rights->commande->creer)
print '';
// multiprix
if($conf->global->PRODUIT_MULTIPRICES)
- print $html->select_produits('','idprod'.$i,'',$conf->product->limit_size,$soc->price_level);
+ print $form->select_produits('','idprod'.$i,'',$conf->product->limit_size,$soc->price_level);
else
- print $html->select_produits('','idprod'.$i,'',$conf->product->limit_size);
+ print $form->select_produits('','idprod'.$i,'',$conf->product->limit_size);
print ' ';
print ' ';
print ' % ';
@@ -1452,7 +1452,7 @@ else
*/
if ($action == 'delete')
{
- $formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1);
+ $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1);
}
/*
@@ -1491,7 +1491,7 @@ else
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1)));
}
- $formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 240);
+ $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 240);
}
/*
@@ -1499,7 +1499,7 @@ else
*/
if ($action == 'close')
{
- $formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_close', '', 0, 1);
+ $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_close', '', 0, 1);
}
/*
@@ -1507,7 +1507,7 @@ else
*/
if ($action == 'cancel')
{
- $formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Cancel'), $langs->trans('ConfirmCancelOrder'), 'confirm_cancel', '', 0, 1);
+ $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Cancel'), $langs->trans('ConfirmCancelOrder'), 'confirm_cancel', '', 0, 1);
}
/*
@@ -1515,7 +1515,7 @@ else
*/
if ($action == 'ask_deleteline')
{
- $formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1);
+ $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1);
}
// Clone confirmation
@@ -1526,10 +1526,10 @@ else
//'text' => $langs->trans("ConfirmClone"),
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
- array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $html->select_company(GETPOST('socid'),'socid','(s.client=1 OR s.client=3)'))
+ array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid'),'socid','(s.client=1 OR s.client=3)'))
);
// Paiement incomplet. On demande si motif = escompte ou autre
- $formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneOrder'),$langs->trans('ConfirmCloneOrder',$object->ref),'confirm_clone',$formquestion,'yes',1);
+ $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneOrder'),$langs->trans('ConfirmCloneOrder',$object->ref),'confirm_clone',$formquestion,'yes',1);
}
if (! $formconfirm)
@@ -1559,7 +1559,7 @@ else
// Ref
print ''.$langs->trans('Ref').' ';
print '';
- print $html->showrefnav($object,'ref','',1,'ref','ref');
+ print $form->showrefnav($object,'ref','',1,'ref','ref');
print ' ';
print ' ';
@@ -1613,7 +1613,7 @@ else
// Remise dispo de type non avoir
$filter='fk_facture_source IS NULL';
print ' ';
- $html->form_remise_dispo($_SERVER["PHP_SELF"].'?id='.$object->id,0,'remise_id',$soc->id,$absolute_discount,$filter);
+ $form->form_remise_dispo($_SERVER["PHP_SELF"].'?id='.$object->id,0,'remise_id',$soc->id,$absolute_discount,$filter);
}
}
if ($absolute_creditnote)
@@ -1637,7 +1637,7 @@ else
print '';
}
@@ -1662,7 +1662,7 @@ else
print '';
}
@@ -1690,11 +1690,11 @@ else
if ($action == 'editdelivery_adress')
{
- $html->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$socid,'fk_address','commande',$object->id);
+ $form->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$socid,'fk_address','commande',$object->id);
}
else
{
- $html->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$socid,'none','commande',$object->id);
+ $form->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$socid,'none','commande',$object->id);
}
print '';
}
@@ -1709,11 +1709,11 @@ else
print '';
if ($action == 'editconditions')
{
- $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->cond_reglement_id,'cond_reglement_id',1);
+ $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->cond_reglement_id,'cond_reglement_id',1);
}
else
{
- $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->cond_reglement_id,'none',1);
+ $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->cond_reglement_id,'none',1);
}
print ' ';
@@ -1729,11 +1729,11 @@ else
print '';
if ($action == 'editmode')
{
- $html->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->mode_reglement_id,'mode_reglement_id');
+ $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->mode_reglement_id,'mode_reglement_id');
}
else
{
- $html->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->mode_reglement_id,'none');
+ $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->mode_reglement_id,'none');
}
print ' ';
@@ -1747,11 +1747,11 @@ else
print '';
if ($action == 'editavailability')
{
- $html->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id,$object->availability_id,'availability_id',1);
+ $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id,$object->availability_id,'availability_id',1);
}
else
{
- $html->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id,$object->availability_id,'none',1);
+ $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id,$object->availability_id,'none',1);
}
print ' ';
@@ -1765,11 +1765,11 @@ else
print '';
if ($_GET['action'] == 'editdemandreason')
{
- $html->form_demand_reason($_SERVER['PHP_SELF'].'?id='.$object->id,$object->demand_reason_id,'demand_reason_id',1);
+ $form->form_demand_reason($_SERVER['PHP_SELF'].'?id='.$object->id,$object->demand_reason_id,'demand_reason_id',1);
}
else
{
- $html->form_demand_reason($_SERVER['PHP_SELF'].'?id='.$object->id,$object->demand_reason_id,'none');
+ $form->form_demand_reason($_SERVER['PHP_SELF'].'?id='.$object->id,$object->demand_reason_id,'none');
}
// Removed because using dictionnary is an admin feature, not a user feature. Ther is already the "star" to show info to admin users.
// This is to avoid too heavy screens and have an uniform look and feel for all screens.
@@ -1791,11 +1791,11 @@ else
//print "$object->id, $object->socid, $object->fk_project";
if ($action == 'classify')
{
- $html->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'projectid');
+ $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'projectid');
}
else
{
- $html->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none');
+ $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none');
}
print ' ';
}
diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php
index 3c3b8a0d709..2a3c6d91175 100644
--- a/htdocs/commande/index.php
+++ b/htdocs/commande/index.php
@@ -47,7 +47,7 @@ if ($user->societe_id > 0)
*/
$commandestatic=new Commande($db);
-$html = new Form($db);
+$form = new Form($db);
$formfile = new FormFile($db);
$help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo Pedidos de clientes";
diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php
index c4a1a6af40c..054499be001 100644
--- a/htdocs/commande/liste.php
+++ b/htdocs/commande/liste.php
@@ -69,7 +69,7 @@ $viewstatut=GETPOST('viewstatut');
$now=dol_now();
-$html = new Form($db);
+$form = new Form($db);
$formfile = new FormFile($db);
$companystatic = new Societe($db);
diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php
index dfd1be92018..17d71af6cb7 100644
--- a/htdocs/commande/note.php
+++ b/htdocs/commande/note.php
@@ -81,7 +81,7 @@ if ($_POST["action"] == 'update' && $user->rights->commande->creer)
llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
-$html = new Form($db);
+$form = new Form($db);
if ($id > 0 || ! empty($ref))
{
@@ -96,7 +96,7 @@ if ($id > 0 || ! empty($ref))
// Ref
print ''.$langs->trans("Ref").' ';
- print $html->showrefnav($commande,'ref','',1,'ref','ref');
+ print $form->showrefnav($commande,'ref','',1,'ref','ref');
print " ";
// Ref commande client
diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php
index 8f4c72389f1..c3e37e57a21 100644
--- a/htdocs/compta/bank/account.php
+++ b/htdocs/compta/bank/account.php
@@ -129,7 +129,7 @@ $paymentstatic=new Paiement($db);
$paymentsupplierstatic=new PaiementFourn($db);
$paymentvatstatic=new TVA($db);
-$html = new Form($db);
+$form = new Form($db);
if ($account || $_GET["ref"])
{
@@ -271,7 +271,7 @@ if ($account || $_GET["ref"])
// Ref
print ''.$langs->trans("Ref").' ';
print '';
- print $html->showrefnav($acct,'ref','',1,'ref');
+ print $form->showrefnav($acct,'ref','',1,'ref');
print ' ';
// Label
@@ -316,7 +316,7 @@ if ($account || $_GET["ref"])
if ($action == 'delete')
{
$text=$langs->trans('ConfirmDeleteTransaction');
- $ret=$html->form_confirm($_SERVER['PHP_SELF'].'?account='.$acct->id.'&rowid='.$_GET["rowid"],$langs->trans('DeleteTransaction'),$text,'confirm_delete');
+ $ret=$form->form_confirm($_SERVER['PHP_SELF'].'?account='.$acct->id.'&rowid='.$_GET["rowid"],$langs->trans('DeleteTransaction'),$text,'confirm_delete');
if ($ret == 'html') print ' ';
}
@@ -354,10 +354,10 @@ if ($account || $_GET["ref"])
print '';
print '';
- $html->select_date($dateop,'op',0,0,0,'transaction');
+ $form->select_date($dateop,'op',0,0,0,'transaction');
print ' ';
print '';
- $html->select_types_paiements((isset($_POST["operation"])?$_POST["operation"]:''),'operation','1,2',2,1);
+ $form->select_types_paiements((isset($_POST["operation"])?$_POST["operation"]:''),'operation','1,2',2,1);
print ' ';
print ' ';
print '';
@@ -409,7 +409,7 @@ if ($account || $_GET["ref"])
print ' ';
//$filtertype=array('TIP'=>'TIP','PRE'=>'PRE',...)
$filtertype='';
- print $html->select_types_paiements($_REQUEST['paiementtype'],'paiementtype',$filtertype,2,1,1,8);
+ print $form->select_types_paiements($_REQUEST['paiementtype'],'paiementtype',$filtertype,2,1,1,8);
print ' ';
print ' ';
print ' ';
@@ -475,8 +475,8 @@ if ($account || $_GET["ref"])
$now=dol_now();
$nows=dol_print_date($now,'%Y%m%d');
- //$html->load_cache_types_paiements();
- //$html->cache_types_paiements
+ //$form->load_cache_types_paiements();
+ //$form->cache_types_paiements
$var=true;
diff --git a/htdocs/compta/bank/admin/bank.php b/htdocs/compta/bank/admin/bank.php
index 0802a931d70..e9c205f2776 100644
--- a/htdocs/compta/bank/admin/bank.php
+++ b/htdocs/compta/bank/admin/bank.php
@@ -80,7 +80,7 @@ if ($action == 'setbankorder')
llxHeader("",$langs->trans("BankSetupModule"));
-$html=new Form($db);
+$form=new Form($db);
$linkback=''.$langs->trans("BackToModuleList").' ';
print_fiche_titre($langs->trans("BankSetupModule"),$linkback,'setup');
diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/fiche.php
index c7f9af67970..2ba2d61417c 100644
--- a/htdocs/compta/bank/fiche.php
+++ b/htdocs/compta/bank/fiche.php
@@ -191,7 +191,7 @@ $countrynotdefined=$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("Se
llxHeader();
$form = new Form($db);
-$htmlcompany = new FormCompany($db);
+$formcompany = new FormCompany($db);
/* ************************************************************************** */
/* */
@@ -273,7 +273,7 @@ if ($action == 'create')
print ' '.$langs->trans('State').' ';
if ($selectedcode)
{
- $htmlcompany->select_departement(isset($_POST["account_departement_id"])?$_POST["account_departement_id"]:'',$selectedcode,'account_departement_id');
+ $formcompany->select_departement(isset($_POST["account_departement_id"])?$_POST["account_departement_id"]:'',$selectedcode,'account_departement_id');
}
else
{
@@ -544,7 +544,7 @@ else
print ' '.$langs->trans('State').' ';
if ($selectedcode)
{
- $htmlcompany->select_departement(isset($_POST["account_departement_id"])?$_POST["account_departement_id"]:$account->fk_departement,$selectedcode,'account_departement_id');
+ $formcompany->select_departement(isset($_POST["account_departement_id"])?$_POST["account_departement_id"]:$account->fk_departement,$selectedcode,'account_departement_id');
}
else
{
diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php
index 9f500eea383..0f0e16af275 100644
--- a/htdocs/compta/bank/ligne.php
+++ b/htdocs/compta/bank/ligne.php
@@ -42,7 +42,7 @@ $orig_account=GETPOST("orig_account");
$accountid=GETPOST('accountid');
$confirm=GETPOST('confirm');
-$html = new Form($db);
+$form = new Form($db);
/*
* Actions
@@ -244,7 +244,7 @@ if ($result)
// Confirmations
if ($action == 'delete_categ')
{
- $ret=$html->form_confirm("ligne.php?rowid=".$rowid."&cat1=".GETPOST("fk_categ")."&orig_account=".$orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1);
+ $ret=$form->form_confirm("ligne.php?rowid=".$rowid."&cat1=".GETPOST("fk_categ")."&orig_account=".$orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1);
if ($ret == 'html') print ' ';
}
@@ -259,7 +259,7 @@ if ($result)
// Ref
print ' '.$langs->trans("Ref")." ";
print '';
- print $html->showrefnav($bankline,'rowid','',1,'rowid','rowid');
+ print $form->showrefnav($bankline,'rowid','',1,'rowid','rowid');
print ' ';
print ' ';
@@ -350,7 +350,7 @@ if ($result)
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
{
print '';
- print $html->select_types_paiements($objp->fk_type,"value",'',2);
+ print $form->select_types_paiements($objp->fk_type,"value",'',2);
print ' ';
if ($objp->receiptid)
{
@@ -404,7 +404,7 @@ if ($result)
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
{
print ' ';
- print $html->select_date($db->jdate($objp->do),'dateo','','','','update',1,0,1,$objp->rappro);
+ print $form->select_date($db->jdate($objp->do),'dateo','','','','update',1,0,1,$objp->rappro);
print ' ';
}
else
@@ -420,7 +420,7 @@ if ($result)
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
{
print '';
- print $html->select_date($db->jdate($objp->dv),'datev','','','','update',1,0,1,$objp->rappro);
+ print $form->select_date($db->jdate($objp->dv),'datev','','','','update',1,0,1,$objp->rappro);
if (! $objp->rappro)
{
print ' ';
diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php
index 0db2c4ec816..c36cfb0fd40 100644
--- a/htdocs/compta/bank/releve.php
+++ b/htdocs/compta/bank/releve.php
@@ -70,7 +70,7 @@ $pagenext = $page + 1;
llxHeader();
-$html = new Form($db);
+$form = new Form($db);
// Load account
@@ -113,7 +113,7 @@ if (! isset($_GET["num"]))
// Ref
print ' '.$langs->trans("Ref").' ';
print '';
- print $html->showrefnav($acct,'ref','',1,'ref');
+ print $form->showrefnav($acct,'ref','',1,'ref');
print ' ';
// Label
diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php
index 528111982e0..a5e8743de4c 100644
--- a/htdocs/compta/bank/search.php
+++ b/htdocs/compta/bank/search.php
@@ -68,7 +68,7 @@ $bankaccountstatic=new Account($db);
llxHeader();
-$html = new Form($db);
+$form = new Form($db);
if ($vline) $viewline = $vline;
else $viewline = 50;
@@ -168,7 +168,7 @@ if ($resql)
print ' ';
print ' ';
print '';
- $html->select_types_paiements(empty($_REQUEST["type"])?'':$_REQUEST["type"], 'type', '', 2, 0, 1, 8);
+ $form->select_types_paiements(empty($_REQUEST["type"])?'':$_REQUEST["type"], 'type', '', 2, 0, 1, 8);
print ' ';
print ' ';
print '';
diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php
index 6a6a1580f64..0d924bbc0d5 100644
--- a/htdocs/compta/bank/treso.php
+++ b/htdocs/compta/bank/treso.php
@@ -61,7 +61,7 @@ $facturestatic=new Facture($db);
$facturefournstatic=new FactureFournisseur($db);
$socialcontribstatic=new ChargeSociales($db);
-$html = new Form($db);
+$form = new Form($db);
if ($_REQUEST["account"] || $_REQUEST["ref"])
{
@@ -99,7 +99,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
// Ref
print ' '.$langs->trans("Ref").' ';
print '';
- print $html->showrefnav($acct,'ref','',1,'ref');
+ print $form->showrefnav($acct,'ref','',1,'ref');
print ' ';
// Label
diff --git a/htdocs/compta/bank/virement.php b/htdocs/compta/bank/virement.php
index 8c6fc905e30..ed05f6e067b 100644
--- a/htdocs/compta/bank/virement.php
+++ b/htdocs/compta/bank/virement.php
@@ -131,7 +131,7 @@ if ($_POST["action"] == 'add')
llxHeader();
-$html=new Form($db);
+$form=new Form($db);
print_fiche_titre($langs->trans("BankTransfer"));
@@ -153,15 +153,15 @@ print '';
$var=false;
print '';
-print $html->select_comptes($_POST['account_from'],'account_from',0,'',1);
+print $form->select_comptes($_POST['account_from'],'account_from',0,'',1);
print " ";
print "\n";
-print $html->select_comptes($_POST['account_to'],'account_to',0,'',1);
+print $form->select_comptes($_POST['account_to'],'account_to',0,'',1);
print " \n";
print "";
-$html->select_date($dateo,'','','','','add');
+$form->select_date($dateo,'','','','','add');
print " \n";
print ' ';
print ' ';
diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php
index 7e4cccbc8e9..14c965373ed 100644
--- a/htdocs/compta/deplacement/fiche.php
+++ b/htdocs/compta/deplacement/fiche.php
@@ -381,9 +381,9 @@ else if ($id)
// Type
print '';
- print $form->editfieldkey("Type",'type',$langs->trans($object->type),'id',$object->id,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees');
+ print $form->editfieldkey("Type",'type',$langs->trans($object->type),$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees');
print ' ';
- print $form->editfieldval("Type",'type',$langs->trans($object->type),'id',$object->id,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees');
+ print $form->editfieldval("Type",'type',$langs->trans($object->type),$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'select:types_fees');
print ' ';
// Who
@@ -395,16 +395,16 @@ else if ($id)
// Date
print '';
- print $form->editfieldkey("Date",'dated',$object->date,'id',$object->id,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker');
+ print $form->editfieldkey("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker');
print ' ';
- print $form->editfieldval("Date",'dated',$object->date,'id',$object->id,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker');
+ print $form->editfieldval("Date",'dated',$object->date,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'datepicker');
print ' ';
// Km/Price
print '';
- print $form->editfieldkey("FeesKilometersOrAmout",'km',$object->km,'id',$object->id,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6');
+ print $form->editfieldkey("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6');
print ' ';
- print $form->editfieldval("FeesKilometersOrAmout",'km',$object->km,'id',$object->id,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6');
+ print $form->editfieldval("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6');
print " ";
// Where
@@ -448,18 +448,18 @@ else if ($id)
// Public note
print '';
- print $form->editfieldkey("NotePublic",'note_public',$object->note_public,'id',$object->id,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'ckeditor:dolibarr_notes:600:180');
+ print $form->editfieldkey("NotePublic",'note_public',$object->note_public,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'ckeditor:dolibarr_notes:600:180');
print ' ';
- print $form->editfieldval("NotePublic",'note_public',$object->note_public,'id',$object->id,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'ckeditor:dolibarr_notes:600:180');
+ print $form->editfieldval("NotePublic",'note_public',$object->note_public,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'ckeditor:dolibarr_notes:600:180');
print " ";
// Private note
if (! $user->societe_id)
{
print '';
- print $form->editfieldkey("NotePrivate",'note',$object->note_private,'id',$object->id,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'ckeditor:dolibarr_notes:600:180');
+ print $form->editfieldkey("NotePrivate",'note',$object->note_private,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'ckeditor:dolibarr_notes:600:180');
print ' ';
- print $form->editfieldval("NotePrivate",'note',$object->note_private,'id',$object->id,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'ckeditor:dolibarr_notes:600:180');
+ print $form->editfieldval("NotePrivate",'note',$object->note_private,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'ckeditor:dolibarr_notes:600:180');
print " ";
}
diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php
index 0051d74f56a..4b41aabd622 100644
--- a/htdocs/compta/dons/fiche.php
+++ b/htdocs/compta/dons/fiche.php
@@ -244,9 +244,9 @@ if ($_REQUEST['action'] == 'builddoc')
llxHeader('',$langs->trans("Donations"),'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Subvenciones');
-$html=new Form($db);
+$form=new Form($db);
$formfile = new FormFile($db);
-$htmlcompany = new FormCompany($db);
+$formcompany = new FormCompany($db);
/* ************************************************************************** */
@@ -272,7 +272,7 @@ if ($_GET["action"] == 'create')
// Date
print ''.$langs->trans("Date").' ';
- $html->select_date($donation_date?$donation_date:-1,'','','','',"add",1,1);
+ $form->select_date($donation_date?$donation_date:-1,'','','','',"add",1,1);
print ' ';
print ''.$langs->trans("Comments").' : ';
@@ -283,7 +283,7 @@ if ($_GET["action"] == 'create')
print " ".''.$langs->trans("Amount").' '.$langs->trans("Currency".$conf->monnaie).' ';
print ''.$langs->trans("PublicDonation")." ";
- print $html->selectyesno("public",isset($_POST["public"])?$_POST["public"]:1,1);
+ print $form->selectyesno("public",isset($_POST["public"])?$_POST["public"]:1,1);
print " \n";
print "".''.$langs->trans("Company").' ';
@@ -294,16 +294,16 @@ if ($_GET["action"] == 'create')
// Zip / Town
print ''.$langs->trans("Zip").' / '.$langs->trans("Town").' ';
- print $htmlcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$don->zip),'zipcode',array('town','selectpays_id','departement_id'),6);
+ print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$don->zip),'zipcode',array('town','selectpays_id','departement_id'),6);
print ' ';
- print $htmlcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$don->town),'town',array('zipcode','selectpays_id','departement_id'));
+ print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$don->town),'town',array('zipcode','selectpays_id','departement_id'));
print ' ';
print "".''.$langs->trans("Country").' ';
print "".''.$langs->trans("EMail").' ';
print "".$langs->trans("PaymentMode")." \n";
- $html->select_types_paiements('', 'modepaiement', 'CRDT', 0, 1);
+ $form->select_types_paiements('', 'modepaiement', 'CRDT', 0, 1);
print " \n";
if ($conf->projet->enabled)
@@ -357,7 +357,7 @@ if ($_GET["rowid"] && $_GET["action"] == 'edit')
// Date
print "".''.$langs->trans("Date").' ';
- $html->select_date($don->date,'','','','',"update");
+ $form->select_date($don->date,'','','','',"update");
print ' ';
print ''.$langs->trans("Comments").' : ';
@@ -368,7 +368,7 @@ if ($_GET["rowid"] && $_GET["action"] == 'edit')
print " ".''.$langs->trans("Amount").' '.$langs->trans("Currency".$conf->monnaie).' ';
print ''.$langs->trans("PublicDonation")." ";
- print $html->selectyesno("public",1,1);
+ print $form->selectyesno("public",1,1);
print " ";
print " \n";
@@ -381,16 +381,16 @@ if ($_GET["rowid"] && $_GET["action"] == 'edit')
// Zip / Town
print ''.$langs->trans("Zip").' / '.$langs->trans("Town").' ';
- print $htmlcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$don->zip),'zipcode',array('town','selectpays_id','departement_id'),6);
+ print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$don->zip),'zipcode',array('town','selectpays_id','departement_id'),6);
print ' ';
- print $htmlcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$don->town),'town',array('zipcode','selectpays_id','departement_id'));
+ print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$don->town),'town',array('zipcode','selectpays_id','departement_id'));
print ' ';
print "".''.$langs->trans("Country").' ';
print "".''.$langs->trans("EMail").' ';
print "".$langs->trans("PaymentMode")." \n";
- $html->select_types_paiements('', 'modepaiement', 'CRDT', 0, 1);
+ $form->select_types_paiements('', 'modepaiement', 'CRDT', 0, 1);
print " \n";
print "".''.$langs->trans("Status").' '.$don->getLibStatut(4).' ';
@@ -443,7 +443,7 @@ if ($_GET["rowid"] && $_GET["action"] != 'edit')
// Ref
print "".''.$langs->trans("Ref").' ';
- print $html->showrefnav($don,'rowid','',1,'rowid','ref','');
+ print $form->showrefnav($don,'rowid','',1,'rowid','ref','');
print ' ';
print ' ';
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 86848e8bbc9..285b44f38be 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -1422,7 +1422,7 @@ if (GETPOST('action') == 'builddoc') // En get ou en post
llxHeader('',$langs->trans('Bill'),'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes');
-$html = new Form($db);
+$form = new Form($db);
$htmlother = new FormOther($db);
$formfile = new FormFile($db);
$now=dol_now();
@@ -1604,7 +1604,7 @@ if ($action == 'create')
print '';
print ' ';
print ' ';
- $desc=$html->textwithpicto($langs->trans("InvoiceStandardAsk"),$langs->transnoentities("InvoiceStandardDesc"),1);
+ $desc=$form->textwithpicto($langs->trans("InvoiceStandardAsk"),$langs->transnoentities("InvoiceStandardDesc"),1);
print $desc;
print ' '."\n";
@@ -1612,7 +1612,7 @@ if ($action == 'create')
print '';
print ' ';
print ' ';
- $desc=$html->textwithpicto($langs->trans("InvoiceDeposit"),$langs->transnoentities("InvoiceDepositDesc"),1);
+ $desc=$form->textwithpicto($langs->trans("InvoiceDeposit"),$langs->transnoentities("InvoiceDepositDesc"),1);
print $desc;
print ' '."\n";
@@ -1622,7 +1622,7 @@ if ($action == 'create')
print '';
print ' ';
print ' ';
- $desc=$html->textwithpicto($langs->trans("InvoiceProForma"),$langs->transnoentities("InvoiceProFormaDesc"),1);
+ $desc=$form->textwithpicto($langs->trans("InvoiceProForma"),$langs->transnoentities("InvoiceProFormaDesc"),1);
print $desc;
print ' '."\n";
}
@@ -1647,7 +1647,7 @@ if ($action == 'create')
$text.=''.$langs->trans("NoReplacableInvoice").' ';
}
$text.='';
- $desc=$html->textwithpicto($text,$langs->transnoentities("InvoiceReplacementDesc"),1);
+ $desc=$form->textwithpicto($text,$langs->transnoentities("InvoiceReplacementDesc"),1);
print $desc;
print ''."\n";
@@ -1672,7 +1672,7 @@ if ($action == 'create')
$text.=''.$langs->trans("NoInvoiceToCorrect").' ';
}
$text.='';
- $desc=$html->textwithpicto($text,$langs->transnoentities("InvoiceAvoirDesc"),1);
+ $desc=$form->textwithpicto($text,$langs->transnoentities("InvoiceAvoirDesc"),1);
//.' ('.$langs->trans("FeatureNotYetAvailable").')',$langs->transnoentities("InvoiceAvoirDesc"),1);
print $desc;
print ''."\n";
@@ -1695,17 +1695,17 @@ if ($action == 'create')
// Date invoice
print ''.$langs->trans('Date').' ';
- $html->select_date($dateinvoice,'','','','',"add",1,1);
+ $form->select_date($dateinvoice,'','','','',"add",1,1);
print ' ';
// Payment term
print ''.$langs->trans('PaymentConditionsShort').' ';
- $html->select_conditions_paiements(isset($_POST['cond_reglement_id'])?$_POST['cond_reglement_id']:$cond_reglement_id,'cond_reglement_id');
+ $form->select_conditions_paiements(isset($_POST['cond_reglement_id'])?$_POST['cond_reglement_id']:$cond_reglement_id,'cond_reglement_id');
print ' ';
// Payment mode
print ''.$langs->trans('PaymentMode').' ';
- $html->select_types_paiements(isset($_POST['mode_reglement_id'])?$_POST['mode_reglement_id']:$mode_reglement_id,'mode_reglement_id');
+ $form->select_types_paiements(isset($_POST['mode_reglement_id'])?$_POST['mode_reglement_id']:$mode_reglement_id,'mode_reglement_id');
print ' ';
// Project
@@ -1726,7 +1726,7 @@ if ($action == 'create')
print '';
include_once(DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php');
$liste=ModelePDFFactures::liste_modeles($db);
- print $html->selectarray('model',$liste,$conf->global->FACTURE_ADDON_PDF);
+ print $form->selectarray('model',$liste,$conf->global->FACTURE_ADDON_PDF);
print " ";
// Public note
@@ -1817,9 +1817,9 @@ if ($action == 'create')
print '';
// multiprix
if($conf->global->PRODUIT_MULTIPRICES)
- $html->select_produits('','idprod'.$i,'',$conf->product->limit_size,$soc->price_level);
+ $form->select_produits('','idprod'.$i,'',$conf->product->limit_size,$soc->price_level);
else
- $html->select_produits('','idprod'.$i,'',$conf->product->limit_size);
+ $form->select_produits('','idprod'.$i,'',$conf->product->limit_size);
print ' ';
print ' ';
print ' % ';
@@ -1832,12 +1832,12 @@ if ($action == 'create')
print '';
print $langs->trans('From').' ';
print ' ';
- print $html->select_date('','date_start'.$i,$usehm,$usehm,1,"add");
+ print $form->select_date('','date_start'.$i,$usehm,$usehm,1,"add");
print ' ';
print '';
print $langs->trans('to').' ';
print ' ';
- print $html->select_date('','date_end'.$i,$usehm,$usehm,1,"add");
+ print $form->select_date('','date_end'.$i,$usehm,$usehm,1,"add");
print '
';
print ' ';
}
@@ -1927,14 +1927,14 @@ else
if ($action == 'converttoreduc')
{
$text=$langs->trans('ConfirmConvertToReduc');
- $formconfirm=$html->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('ConvertToReduc'),$text,'confirm_converttoreduc','',"yes",2);
+ $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('ConvertToReduc'),$text,'confirm_converttoreduc','',"yes",2);
}
// Confirmation to delete invoice
if ($action == 'delete')
{
$text=$langs->trans('ConfirmDeleteBill');
- $formconfirm=$html->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('DeleteBill'),$text,'confirm_delete','',0,1);
+ $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('DeleteBill'),$text,'confirm_delete','',0,1);
}
// Confirmation de la validation
@@ -1967,13 +1967,13 @@ else
$text.=$notify->confirmMessage('NOTIFY_VAL_FAC',$object->socid);
}
- $formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('ValidateBill'),$text,'confirm_valid','',"yes",($conf->notification->enabled?0:2));
+ $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('ValidateBill'),$text,'confirm_valid','',"yes",($conf->notification->enabled?0:2));
}
// Confirmation du classement paye
if ($action == 'paid' && $resteapayer <= 0)
{
- $formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('ClassifyPaid'),$langs->trans('ConfirmClassifyPaidBill',$object->ref),'confirm_paid','',"yes",1);
+ $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('ClassifyPaid'),$langs->trans('ConfirmClassifyPaidBill',$object->ref),'confirm_paid','',"yes",1);
}
if ($action == 'paid' && $resteapayer > 0)
{
@@ -1987,8 +1987,8 @@ else
$close[$i]['label']=$langs->trans("ConfirmClassifyPaidPartiallyReasonBadCustomerDesc");$i++;
// Texte
$i=0;
- $close[$i]['reason']=$html->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonDiscountVat",$resteapayer,$langs->trans("Currency".$conf->monnaie)),$close[$i]['label'],1);$i++;
- $close[$i]['reason']=$html->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer",$resteapayer,$langs->trans("Currency".$conf->monnaie)),$close[$i]['label'],1);$i++;
+ $close[$i]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonDiscountVat",$resteapayer,$langs->trans("Currency".$conf->monnaie)),$close[$i]['label'],1);$i++;
+ $close[$i]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer",$resteapayer,$langs->trans("Currency".$conf->monnaie)),$close[$i]['label'],1);$i++;
// arrayreasons[code]=reason
foreach($close as $key => $val)
{
@@ -2002,7 +2002,7 @@ else
array('type' => 'text', 'name' => 'close_note', 'label' => $langs->trans("Comment"), 'value' => '', 'size' => '100')
);
// Paiement incomplet. On demande si motif = escompte ou autre
- $formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('ClassifyPaid'),$langs->trans('ConfirmClassifyPaidPartially',$object->ref),'confirm_paid_partially',$formquestion,"yes");
+ $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('ClassifyPaid'),$langs->trans('ConfirmClassifyPaidPartially',$object->ref),'confirm_paid_partially',$formquestion,"yes");
}
// Confirmation du classement abandonne
@@ -2029,8 +2029,8 @@ else
$close[1]['label']=$langs->trans("ConfirmClassifyPaidPartiallyReasonBadCustomerDesc");
$close[2]['label']=$langs->trans("ConfirmClassifyAbandonReasonOtherDesc");
// Texte
- $close[1]['reason']=$html->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer",$object->ref),$close[1]['label'],1);
- $close[2]['reason']=$html->textwithpicto($langs->transnoentities("ConfirmClassifyAbandonReasonOther"),$close[2]['label'],1);
+ $close[1]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer",$object->ref),$close[1]['label'],1);
+ $close[2]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyAbandonReasonOther"),$close[2]['label'],1);
// arrayreasons
$arrayreasons[$close[1]['code']]=$close[1]['reason'];
$arrayreasons[$close[2]['code']]=$close[2]['reason'];
@@ -2042,14 +2042,14 @@ else
array('type' => 'text', 'name' => 'close_note', 'label' => $langs->trans("Comment"), 'value' => '', 'size' => '100')
);
- $formconfirm=$html->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('CancelBill'),$langs->trans('ConfirmCancelBill',$object->ref),'confirm_canceled',$formquestion,"yes");
+ $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('CancelBill'),$langs->trans('ConfirmCancelBill',$object->ref),'confirm_canceled',$formquestion,"yes");
}
}
// Confirmation de la suppression d'une ligne produit
if ($action == 'ask_deleteline')
{
- $formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1);
+ $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1);
}
// Clone confirmation
@@ -2061,7 +2061,7 @@ else
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1)
);
// Paiement incomplet. On demande si motif = escompte ou autre
- $formconfirm=$html->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes',1);
+ $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes',1);
}
if (! $formconfirm)
@@ -2092,7 +2092,7 @@ else
{
dol_print_error('',$discount->error);
}
- print $html->showrefnav($object,'ref','',1,'facnumber','ref',$morehtmlref);
+ print $form->showrefnav($object,'ref','',1,'facnumber','ref',$morehtmlref);
print ' ';
// Third party
@@ -2106,7 +2106,7 @@ else
print '';
if ($action == 'editthirdparty')
{
- $html->form_thirdparty($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->socid,'socid');
+ $form->form_thirdparty($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->socid,'socid');
}
else
{
@@ -2186,7 +2186,7 @@ else
{
$text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->monnaie));
$text2=$langs->trans("AbsoluteDiscountUse");
- print $html->textwithpicto($text,$text2);
+ print $form->textwithpicto($text,$text2);
}
}
}
@@ -2195,7 +2195,7 @@ else
// Remise dispo de type remise fixe (not credit note)
$filter='fk_facture_source IS NULL';
print ' ';
- $html->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id',$soc->id, $absolute_discount, $filter, $resteapayer, ' ('.$addabsolutediscount.')');
+ $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id',$soc->id, $absolute_discount, $filter, $resteapayer, ' ('.$addabsolutediscount.')');
}
}
else
@@ -2215,7 +2215,7 @@ else
if ($object->statut == 0 && $object->type != 3)
{
$text=$langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->monnaie));
- print $html->textwithpicto($text,$langs->trans("CreditNoteDepositUse"));
+ print $form->textwithpicto($text,$langs->trans("CreditNoteDepositUse"));
}
else
{
@@ -2227,7 +2227,7 @@ else
// Remise dispo de type avoir
$filter='fk_facture_source IS NOT NULL';
if (! $absolute_discount) print ' ';
- $html->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filter, $resteapayer);
+ $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filter, $resteapayer);
}
}
if (! $absolute_discount && ! $absolute_creditnote)
@@ -2258,7 +2258,7 @@ else
{
if ($action == 'editinvoicedate')
{
- $html->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->date,'invoicedate');
+ $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->date,'invoicedate');
}
else
{
@@ -2388,7 +2388,7 @@ else
if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'discount_vat')
{
print ' ';
- print $html->textwithpicto($langs->trans("Escompte").':',$langs->trans("HelpEscompte"),-1);
+ print $form->textwithpicto($langs->trans("Escompte").':',$langs->trans("HelpEscompte"),-1);
print ' '.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' ';
$resteapayeraffiche=0;
}
@@ -2396,7 +2396,7 @@ else
if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'badcustomer')
{
print '';
- print $html->textwithpicto($langs->trans("Abandoned").':',$langs->trans("HelpAbandonBadCustomer"),-1);
+ print $form->textwithpicto($langs->trans("Abandoned").':',$langs->trans("HelpAbandonBadCustomer"),-1);
print ' '.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' ';
//$resteapayeraffiche=0;
}
@@ -2404,7 +2404,7 @@ else
if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'product_returned')
{
print '';
- print $html->textwithpicto($langs->trans("ProductReturned").':',$langs->trans("HelpAbandonProductReturned"),-1);
+ print $form->textwithpicto($langs->trans("ProductReturned").':',$langs->trans("HelpAbandonProductReturned"),-1);
print ' '.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' ';
$resteapayeraffiche=0;
}
@@ -2414,7 +2414,7 @@ else
print '';
$text=$langs->trans("HelpAbandonOther");
if ($object->close_note) $text.=''.$langs->trans("Reason").' :'.$object->close_note;
- print $html->textwithpicto($langs->trans("Abandoned").':',$text,-1);
+ print $form->textwithpicto($langs->trans("Abandoned").':',$text,-1);
print ' '.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' ';
$resteapayeraffiche=0;
}
@@ -2453,7 +2453,7 @@ else
{
if ($action == 'editpaymentterm')
{
- $html->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->date_lim_reglement,'paymentterm');
+ $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->date_lim_reglement,'paymentterm');
}
else
{
@@ -2479,11 +2479,11 @@ else
{
if ($action == 'editconditions')
{
- $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->cond_reglement_id,'cond_reglement_id');
+ $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->cond_reglement_id,'cond_reglement_id');
}
else
{
- $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->cond_reglement_id,'none');
+ $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->cond_reglement_id,'none');
}
}
else
@@ -2502,11 +2502,11 @@ else
print '';
if ($action == 'editmode')
{
- $html->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->mode_reglement_id,'mode_reglement_id');
+ $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->mode_reglement_id,'mode_reglement_id');
}
else
{
- $html->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->mode_reglement_id,'none');
+ $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->mode_reglement_id,'none');
}
print ' ';
@@ -2562,11 +2562,11 @@ else
print '';
if ($action == 'classify')
{
- $html->form_project($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->socid,$object->fk_project,'projectid');
+ $form->form_project($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->socid,$object->fk_project,'projectid');
}
else
{
- $html->form_project($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->socid,$object->fk_project,'none');
+ $form->form_project($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->socid,$object->fk_project,'none');
}
print ' ';
print '';
diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php
index bb0db249e39..b8f76d5c24b 100644
--- a/htdocs/compta/facture/apercu.php
+++ b/htdocs/compta/facture/apercu.php
@@ -50,7 +50,7 @@ $now=dol_now();
llxHeader('',$langs->trans("Bill"),'Facture');
-$html = new Form($db);
+$form = new Form($db);
/* *************************************************************************** */
/* */
@@ -162,7 +162,7 @@ if ($id > 0 || ! empty($ref))
{
$text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->monnaie));
$text2=$langs->trans("AbsoluteDiscountUse");
- print $html->textwithpicto($text,$text2);
+ print $form->textwithpicto($text,$text2);
}
}
}
@@ -171,7 +171,7 @@ if ($id > 0 || ! empty($ref))
// Remise dispo de type remise fixe (not credit note)
$filter='fk_facture_source IS NULL';
print ' ';
- $html->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id',$soc->id, $absolute_discount, $filter, $resteapayer, ' - '.$addabsolutediscount);
+ $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id',$soc->id, $absolute_discount, $filter, $resteapayer, ' - '.$addabsolutediscount);
}
}
else
@@ -191,7 +191,7 @@ if ($id > 0 || ! empty($ref))
if ($object->statut == 0 && $object->type != 3)
{
$text=$langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->monnaie));
- print $html->textwithpicto($text,$langs->trans("CreditNoteDepositUse"));
+ print $form->textwithpicto($text,$langs->trans("CreditNoteDepositUse"));
}
else
{
@@ -203,7 +203,7 @@ if ($id > 0 || ! empty($ref))
// Remise dispo de type avoir
$filter='fk_facture_source IS NOT NULL';
if (! $absolute_discount) print ' ';
- $html->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filter, $resteapayer);
+ $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filter, $resteapayer);
}
}
if (! $absolute_discount && ! $absolute_creditnote)
@@ -238,7 +238,7 @@ if ($id > 0 || ! empty($ref))
{
if ($action == 'editpaymentterm')
{
- $html->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->date_lim_reglement,'paymentterm');
+ $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->date_lim_reglement,'paymentterm');
}
else
{
@@ -254,7 +254,7 @@ if ($id > 0 || ! empty($ref))
// Conditions reglement
print ''.$langs->trans("PaymentConditionsShort").' ';
- $html->form_conditions_reglement($_SERVER["PHP_SELF"]."?facid=$object->id",$object->cond_reglement_id,"none");
+ $form->form_conditions_reglement($_SERVER["PHP_SELF"]."?facid=$object->id",$object->cond_reglement_id,"none");
print ' ';
print ' ';
@@ -268,11 +268,11 @@ if ($id > 0 || ! empty($ref))
print '';
if ($action == 'editmode')
{
- $html->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->mode_reglement_id,'mode_reglement_id');
+ $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->mode_reglement_id,'mode_reglement_id');
}
else
{
- $html->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->mode_reglement_id,'none');
+ $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->mode_reglement_id,'none');
}
print ' ';
diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php
index f826d454858..1787baa2208 100644
--- a/htdocs/compta/facture/contact.php
+++ b/htdocs/compta/facture/contact.php
@@ -112,7 +112,7 @@ if ($_GET["action"] == 'deleteline' && $user->rights->facture->creer)
llxHeader('', $langs->trans("Bill"), "Facture");
-$html = new Form($db);
+$form = new Form($db);
$formcompany = new FormCompany($db);
$contactstatic=new Contact($db);
$userstatic=new User($db);
@@ -157,7 +157,7 @@ if ($id > 0 || ! empty($ref))
{
dol_print_error('',$discount->error);
}
- print $html->showrefnav($facture,'ref','',1,'facnumber','ref',$morehtmlref);
+ print $form->showrefnav($facture,'ref','',1,'facnumber','ref',$morehtmlref);
print '';
// Customer
@@ -209,7 +209,7 @@ if ($id > 0 || ! empty($ref))
print '';
// Ge get ids of alreadey selected users
//$userAlreadySelected = $facture->getListContactId('internal'); // On ne doit pas desactiver un contact deja selectionner car on doit pouvoir le seclectionner une deuxieme fois pour un autre type
- $html->select_users($user->id,'contactid',0,$userAlreadySelected);
+ $form->select_users($user->id,'contactid',0,$userAlreadySelected);
print ' ';
print '';
$formcompany->selectTypeContact($facture, '', 'type','internal');
@@ -239,7 +239,7 @@ if ($id > 0 || ! empty($ref))
print ' ';
print '';
- $nbofcontacts=$html->select_contacts($selectedCompany, '', 'contactid');
+ $nbofcontacts=$form->select_contacts($selectedCompany, '', 'contactid');
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
print ' ';
print '';
diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php
index 14a47995a1b..17c0e3bdb8c 100644
--- a/htdocs/compta/facture/document.php
+++ b/htdocs/compta/facture/document.php
@@ -124,7 +124,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
llxHeader();
-$html = new Form($db);
+$form = new Form($db);
$id = $_GET['facid']?$_GET['facid']:$_GET['id'];
$ref= $_GET['ref'];
@@ -166,7 +166,7 @@ if ($id > 0 || ! empty($ref))
{
dol_print_error('',$discount->error);
}
- print $html->showrefnav($object,'ref','',1,'facnumber','ref',$morehtmlref);
+ print $form->showrefnav($object,'ref','',1,'facnumber','ref',$morehtmlref);
print ' ';
// Company
@@ -184,7 +184,7 @@ if ($id > 0 || ! empty($ref))
*/
if ($action == 'delete')
{
- $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$id.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
+ $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?facid='.$id.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
if ($ret == 'html') print ' ';
}
diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php
index fe73d5f2bcc..e227ff8ae7f 100644
--- a/htdocs/compta/facture/fiche-rec.php
+++ b/htdocs/compta/facture/fiche-rec.php
@@ -94,7 +94,7 @@ if ($_REQUEST["action"] == 'delete' && $user->rights->facture->supprimer)
llxHeader('',$langs->trans("RepeatableInvoices"),'ch-facture.html#s-fac-facture-rec');
-$html = new Form($db);
+$form = new Form($db);
/*
* Create mode
@@ -135,11 +135,11 @@ if ($_GET["action"] == 'create')
print "".$langs->trans("Author")." ".$user->getFullName($langs)." ";
print "".$langs->trans("PaymentConditions")." ";
- $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$facture->id,$facture->cond_reglement_id,'none');
+ $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$facture->id,$facture->cond_reglement_id,'none');
print " ";
print "".$langs->trans("PaymentMode")." ";
- $html->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$facture->id,$facture->mode_reglement_id,'none');
+ $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$facture->id,$facture->mode_reglement_id,'none');
print " ";
if ($conf->projet->enabled)
@@ -234,7 +234,7 @@ if ($_GET["action"] == 'create')
$text=$product_static->getNomUrl(1);
$text.= ' - '.$objp->product_label;
$description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($objp->description));
- print $html->textwithtooltip($text,$description,3,'','',$i);
+ print $form->textwithtooltip($text,$description,3,'','',$i);
// Show range
print_date_range($db->jdate($objp->date_start),$db->jdate($objp->date_end));
@@ -353,7 +353,7 @@ else
print ''.$langs->trans("Customer").' ';
print ''.$soc->getNomUrl(1).' ';
print "". $langs->trans("PaymentConditions") ." : ";
- $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->cond_reglement_id,'none');
+ $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->cond_reglement_id,'none');
print " ";
print "".$langs->trans("Author")." ".$author->getFullName($langs)." ";
@@ -368,7 +368,7 @@ else
}
print $langs->trans("PaymentMode") ." : ";
- $html->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->mode_reglement_id,'none');
+ $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->mode_reglement_id,'none');
print " ";
print ''.$langs->trans("AmountHT").' ';
@@ -435,7 +435,7 @@ else
$text=$product_static->getNomUrl(1);
$text.= ' - '.$fac->lines[$i]->libelle;
$description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($fac->lines[$i]->desc));
- print $html->textwithtooltip($text,$description,3,'','',$i);
+ print $form->textwithtooltip($text,$description,3,'','',$i);
// Show range
print_date_range($fac->lines[$i]->date_start,$fac->lines[$i]->date_end);
diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php
index 8bfa5d75072..9641c2d2e59 100644
--- a/htdocs/compta/facture/impayees.php
+++ b/htdocs/compta/facture/impayees.php
@@ -138,7 +138,7 @@ if ($option=='late') $title=$langs->trans("BillsCustomersUnpaid");
llxHeader('',$title);
-$html = new Form($db);
+$form = new Form($db);
$formfile = new FormFile($db);
?>
diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php
index 90b338b8ce6..ea22971c1bf 100644
--- a/htdocs/compta/facture/note.php
+++ b/htdocs/compta/facture/note.php
@@ -91,7 +91,7 @@ if ($_POST["action"] == 'update' && $user->rights->facture->creer)
llxHeader();
-$html = new Form($db);
+$form = new Form($db);
$id = $_GET['facid'];
$ref= $_GET['ref'];
@@ -123,7 +123,7 @@ if ($id > 0 || ! empty($ref))
{
dol_print_error('',$discount->error);
}
- print $html->showrefnav($fac,'ref','',1,'facnumber','ref',$morehtmlref);
+ print $form->showrefnav($fac,'ref','',1,'facnumber','ref',$morehtmlref);
print ' ';
// Company
diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php
index a6b603d6d7b..8291b5ab37e 100644
--- a/htdocs/compta/facture/prelevement.php
+++ b/htdocs/compta/facture/prelevement.php
@@ -90,7 +90,7 @@ $now=dol_now();
llxHeader('',$langs->trans("Bill"));
-$html = new Form($db);
+$form = new Form($db);
/* *************************************************************************** */
/* */
@@ -155,7 +155,7 @@ if ($_REQUEST["facid"] > 0 || $_REQUEST["ref"])
{
dol_print_error('',$discount->error);
}
- print $html->showrefnav($fac,'ref','',1,'facnumber','ref',$morehtmlref);
+ print $form->showrefnav($fac,'ref','',1,'facnumber','ref',$morehtmlref);
print "";
// Third party
@@ -227,7 +227,7 @@ if ($_REQUEST["facid"] > 0 || $_REQUEST["ref"])
{
$text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->monnaie));
$text2=$langs->trans("AbsoluteDiscountUse");
- print $html->textwithpicto($text,$text2);
+ print $form->textwithpicto($text,$text2);
}
}
}
@@ -236,7 +236,7 @@ if ($_REQUEST["facid"] > 0 || $_REQUEST["ref"])
// Remise dispo de type non avoir
$filter='fk_facture_source IS NULL';
print ' ';
- $html->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$fac->id,0,'remise_id',$soc->id,$absolute_discount,$filter,$resteapayer);
+ $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$fac->id,0,'remise_id',$soc->id,$absolute_discount,$filter,$resteapayer);
}
}
if ($absolute_creditnote > 0)
@@ -247,7 +247,7 @@ if ($_REQUEST["facid"] > 0 || $_REQUEST["ref"])
if ($fac->statut == 0 && $fac->type != 3)
{
$text=$langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->monnaie));
- print $html->textwithpicto($text,$langs->trans("CreditNoteDepositUse"));
+ print $form->textwithpicto($text,$langs->trans("CreditNoteDepositUse"));
}
else print $langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->monnaie)).'.';
}
@@ -256,7 +256,7 @@ if ($_REQUEST["facid"] > 0 || $_REQUEST["ref"])
// Remise dispo de type avoir
$filter='fk_facture_source IS NOT NULL';
if (! $absolute_discount) print ' ';
- $html->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$fac->id,0,'remise_id_for_payment',$soc->id,$absolute_creditnote,$filter,$resteapayer);
+ $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$fac->id,0,'remise_id_for_payment',$soc->id,$absolute_creditnote,$filter,$resteapayer);
}
}
if (! $absolute_discount && ! $absolute_creditnote) print $langs->trans("CompanyHasNoAbsoluteDiscount").'.';
@@ -275,7 +275,7 @@ if ($_REQUEST["facid"] > 0 || $_REQUEST["ref"])
{
if ($_GET['action'] == 'editinvoicedate')
{
- $html->form_date($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->date,'invoicedate');
+ $form->form_date($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->date,'invoicedate');
}
else
{
@@ -301,7 +301,7 @@ if ($_REQUEST["facid"] > 0 || $_REQUEST["ref"])
{
if ($_GET['action'] == 'editpaymentterm')
{
- $html->form_date($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->date_lim_reglement,'paymentterm');
+ $form->form_date($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->date_lim_reglement,'paymentterm');
}
else
{
@@ -327,11 +327,11 @@ if ($_REQUEST["facid"] > 0 || $_REQUEST["ref"])
{
if ($_GET['action'] == 'editconditions')
{
- $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->cond_reglement_id,'cond_reglement_id');
+ $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->cond_reglement_id,'cond_reglement_id');
}
else
{
- $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->cond_reglement_id,'none');
+ $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->cond_reglement_id,'none');
}
}
else
@@ -350,11 +350,11 @@ if ($_REQUEST["facid"] > 0 || $_REQUEST["ref"])
print '';
if ($_GET['action'] == 'editmode')
{
- $html->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->mode_reglement_id,'mode_reglement_id');
+ $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->mode_reglement_id,'mode_reglement_id');
}
else
{
- $html->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->mode_reglement_id,'none');
+ $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->mode_reglement_id,'none');
}
print ' ';
diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php
index b5652adf2a9..4166a4ab130 100644
--- a/htdocs/compta/index.php
+++ b/htdocs/compta/index.php
@@ -87,7 +87,7 @@ $now=dol_now();
$facturestatic=new Facture($db);
$facturesupplierstatic=new FactureFournisseur($db);
-$html = new Form($db);
+$form = new Form($db);
$formfile = new FormFile($db);
$thirdpartystatic = new Societe($db);
diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php
index f48dda6de05..621287c39e4 100755
--- a/htdocs/compta/journal/purchasesjournal.php
+++ b/htdocs/compta/journal/purchasesjournal.php
@@ -55,7 +55,7 @@ if ($user->societe_id > 0)
llxHeader('','','');
-$html=new Form($db);
+$form=new Form($db);
$year_current = strftime("%Y",dol_now());
$pastmonth = strftime("%m",dol_now()) - 1;
@@ -78,7 +78,7 @@ $nom=$langs->trans("PurchasesJournal");
//$nomlink=;
$builddate=time();
$description=$langs->trans("DescPurchasesJournal");
-$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink);
$p = explode(":", $conf->global->MAIN_INFO_SOCIETE_PAYS);
diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php
index 6d42ecbe133..3357078459c 100755
--- a/htdocs/compta/journal/sellsjournal.php
+++ b/htdocs/compta/journal/sellsjournal.php
@@ -54,7 +54,7 @@ if ($user->societe_id > 0)
llxHeader('','','');
-$html=new Form($db);
+$form=new Form($db);
// Put here content of your page
// ...
@@ -80,7 +80,7 @@ $nom=$langs->trans("SellsJournal");
//$nomlink=;
$builddate=time();
$description=$langs->trans("DescSellsJournal");
-$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink);
$p = explode(":", $conf->global->MAIN_INFO_SOCIETE_PAYS);
diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php
index 6f2bbae3029..4e2f110e0ce 100644
--- a/htdocs/compta/localtax/clients.php
+++ b/htdocs/compta/localtax/clients.php
@@ -83,7 +83,7 @@ $result = restrictedArea($user, 'tax', '', '', 'charges');
* View
*/
-$html=new Form($db);
+$form=new Form($db);
$company_static=new Societe($db);
$morequerystring='';
@@ -105,7 +105,7 @@ $fsearch.=' ';
if ($modetax==1) // Calculate on invoice for goods and services
{
$nom=$langs->transcountry("LT2ReportByCustomersInInputOutputMode",$mysoc->pays_code);
- $period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
$description=$langs->trans("RulesVATDue");
if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.=' '.$langs->trans("WarningDepositsNotIncluded");
$description.=$fsearch;
@@ -122,7 +122,7 @@ if ($modetax==1) // Calculate on invoice for goods and services
if ($modetax==0) // Invoice for goods, payment for services
{
$nom=$langs->transcountry("LT2ReportByCustomersInInputOutputMode",$mysoc->pays_code);
- $period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
$description=$langs->trans("RulesVATIn");
if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.=' '.$langs->trans("WarningDepositsNotIncluded");
$description.=$fsearch;
diff --git a/htdocs/compta/localtax/fiche.php b/htdocs/compta/localtax/fiche.php
index b27fe6f63b2..585fd9057e5 100644
--- a/htdocs/compta/localtax/fiche.php
+++ b/htdocs/compta/localtax/fiche.php
@@ -127,7 +127,7 @@ if ($_GET["action"] == 'delete')
llxHeader();
-$html = new Form($db);
+$form = new Form($db);
if ($id)
{
@@ -155,11 +155,11 @@ if ($_GET["action"] == 'create')
print "";
print ''.$langs->trans("DatePayment").' ';
- print $html->select_date($datep,"datep",'','','','add');
+ print $form->select_date($datep,"datep",'','','','add');
print ' ';
print ''.$langs->trans("DateValue").' ';
- print $html->select_date($datev,"datev",'','','','add');
+ print $form->select_date($datev,"datev",'','','','add');
print ' ';
// Label
@@ -171,11 +171,11 @@ if ($_GET["action"] == 'create')
if ($conf->banque->enabled)
{
print ''.$langs->trans("Account").' ';
- $html->select_comptes($_POST["accountid"],"accountid",0,"courant=1",1); // Affiche liste des comptes courant
+ $form->select_comptes($_POST["accountid"],"accountid",0,"courant=1",1); // Affiche liste des comptes courant
print ' ';
print ''.$langs->trans("PaymentMode").' ';
- $html->select_types_paiements($_POST["paiementtype"], "paiementtype");
+ $form->select_types_paiements($_POST["paiementtype"], "paiementtype");
print " \n";
print " ";
}
diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php
index f929c9aa712..6eaccc3fa33 100644
--- a/htdocs/compta/paiement.php
+++ b/htdocs/compta/paiement.php
@@ -208,7 +208,7 @@ if ($action == 'confirm_paiement' && $confirm == 'yes')
llxHeader();
-$html=new Form($db);
+$form=new Form($db);
if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paiement')
@@ -355,7 +355,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print ''.$langs->trans('Date').' ';
$datepayment = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
$datepayment= ($datepayment == '' ? (empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0) : $datepayment);
- $html->select_date($datepayment,'','','',0,"add_paiement",1,1);
+ $form->select_date($datepayment,'','','',0,"add_paiement",1,1);
print ' ';
print ''.$langs->trans('Comments').' ';
@@ -364,7 +364,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
// Payment mode
print ''.$langs->trans('PaymentMode').' ';
- $html->select_types_paiements((GETPOST('paiementcode')?GETPOST('paiementcode'):$facture->mode_reglement_code),'paiementcode','',2);
+ $form->select_types_paiements((GETPOST('paiementcode')?GETPOST('paiementcode'):$facture->mode_reglement_code),'paiementcode','',2);
print " \n";
print '';
print ' ';
@@ -394,7 +394,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
if ($facture->type != 2) print ''.$langs->trans('AccountToCredit').' ';
if ($facture->type == 2) print ''.$langs->trans('AccountToDebit').' ';
print '';
- $html->select_comptes($accountid,'accountid',0,'',2);
+ $form->select_comptes($accountid,'accountid',0,'',2);
print ' ';
}
else
@@ -604,7 +604,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
$text.=' '.$langs->trans("AllCompletelyPayedInvoiceWillBeClosed");
print ' ';
}
- $html->form_confirm($_SERVER['PHP_SELF'].'?facid='.$facture->id.'&socid='.$facture->socid.'&type='.$facture->type,$langs->trans('ReceivedCustomersPayments'),$text,'confirm_paiement',$formquestion,$preselectedchoice);
+ $form->form_confirm($_SERVER['PHP_SELF'].'?facid='.$facture->id.'&socid='.$facture->socid.'&type='.$facture->type,$langs->trans('ReceivedCustomersPayments'),$text,'confirm_paiement',$formquestion,$preselectedchoice);
}
print "\n";
diff --git a/htdocs/compta/paiement/cheque/fiche.php b/htdocs/compta/paiement/cheque/fiche.php
index a2933c0959a..a67c000f748 100644
--- a/htdocs/compta/paiement/cheque/fiche.php
+++ b/htdocs/compta/paiement/cheque/fiche.php
@@ -229,7 +229,7 @@ if (GETPOST('removefilter'))
llxHeader();
-$html = new Form($db);
+$form = new Form($db);
$formfile = new FormFile($db);
@@ -269,7 +269,7 @@ else
*/
if ($action == 'delete')
{
- $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$remisecheque->id, $langs->trans("DeleteCheckReceipt"), $langs->trans("ConfirmDeleteCheckReceipt"), 'confirm_delete','','',1);
+ $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$remisecheque->id, $langs->trans("DeleteCheckReceipt"), $langs->trans("ConfirmDeleteCheckReceipt"), 'confirm_delete','','',1);
if ($ret == 'html') print ' ';
}
@@ -279,7 +279,7 @@ else
if ($action == 'valide')
{
$facid = $_GET['facid'];
- $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$remisecheque->id, $langs->trans("ValidateCheckReceipt"), $langs->trans("ConfirmValidateCheckReceipt"), 'confirm_valide','','',1);
+ $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$remisecheque->id, $langs->trans("ValidateCheckReceipt"), $langs->trans("ConfirmValidateCheckReceipt"), 'confirm_valide','','',1);
if ($ret == 'html') print ' ';
}
}
@@ -304,10 +304,10 @@ if ($action == 'new')
//print ''.$langs->trans('Date').' '.dol_print_date($now,'day').' ';
// Filter
print ''.$langs->trans("DateChequeReceived").' ';
- print $html->select_date($filterdate,'fd',0,0,1,'',1,1);
+ print $form->select_date($filterdate,'fd',0,0,1,'',1,1);
print ' ';
print ''.$langs->trans("BankAccount").' ';
- print $html->select_comptes($filteraccountid,'accountid',0,'courant <> 2',1);
+ print $form->select_comptes($filteraccountid,'accountid',0,'courant <> 2',1);
print ' ';
print '
';
print '';
@@ -448,7 +448,7 @@ else
print '';
print ''.$langs->trans('Ref').' ';
- print $html->showrefnav($remisecheque,'ref',$linkback, 1, 'number');
+ print $form->showrefnav($remisecheque,'ref',$linkback, 1, 'number');
print " ";
print " \n";
@@ -466,7 +466,7 @@ else
print '';
}
diff --git a/htdocs/compta/paiement/fiche.php b/htdocs/compta/paiement/fiche.php
index b0b9dc690df..7e6e9fe06ce 100644
--- a/htdocs/compta/paiement/fiche.php
+++ b/htdocs/compta/paiement/fiche.php
@@ -174,7 +174,7 @@ if ($result <= 0)
exit;
}
-$html = new Form($db);
+$form = new Form($db);
$h=0;
@@ -195,7 +195,7 @@ dol_fiche_head($head, $hselected, $langs->trans("PaymentCustomerInvoice"), 0, 'p
*/
if ($action == 'delete')
{
- $ret=$html->form_confirm('fiche.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2);
+ $ret=$form->form_confirm('fiche.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2);
if ($ret == 'html') print ' ';
}
@@ -205,7 +205,7 @@ if ($action == 'delete')
if ($action == 'valide')
{
$facid = $_GET['facid'];
- $ret=$html->form_confirm('fiche.php?id='.$paiement->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2);
+ $ret=$form->form_confirm('fiche.php?id='.$paiement->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2);
if ($ret == 'html') print ' ';
}
@@ -219,8 +219,8 @@ print '';
print ''.$langs->trans('Ref').' '.$paiement->id.' ';
// Date payment
-print ''.$html->editfieldkey("Date",'date',$paiement->date,'id',$paiement->id,$user->rights->facture->paiement).' ';
-print $html->editfieldval("Date",'date',$paiement->date,'id',$paiement->id,$user->rights->facture->paiement,'day');
+print ' '.$form->editfieldkey("Date",'date',$paiement->date,$paiement,$user->rights->facture->paiement).' ';
+print $form->editfieldval("Date",'date',$paiement->date,$paiement,$user->rights->facture->paiement,'day');
print ' ';
// Payment type (VIR, LIQ, ...)
@@ -228,16 +228,16 @@ $labeltype=$langs->trans("PaymentType".$paiement->type_code)!=("PaymentType".$pa
print ''.$langs->trans('PaymentMode').' '.$labeltype.' ';
// Payment numero
-print ''.$html->editfieldkey("Numero",'num',$paiement->numero,'id',$paiement->id,$paiement->statut == 0 && $user->rights->fournisseur->facture->creer).' ';
-print $html->editfieldval("Numero",'num',$paiement->numero,'id',$paiement->id,$paiement->statut == 0 && $user->rights->fournisseur->facture->creer,'string');
+print ' '.$form->editfieldkey("Numero",'num',$paiement->numero,$paiement,$paiement->statut == 0 && $user->rights->fournisseur->facture->creer).' ';
+print $form->editfieldval("Numero",'num',$paiement->numero,$paiement,$paiement->statut == 0 && $user->rights->fournisseur->facture->creer,'string');
print ' ';
// Amount
print ''.$langs->trans('Amount').' '.price($paiement->montant).' '.$langs->trans('Currency'.$conf->monnaie).' ';
// Note
-print ''.$html->editfieldkey("Note",'note',$paiement->note,'id',$paiement->id,$user->rights->facture->paiement).' ';
-print $html->editfieldval("Note",'note',$paiement->note,'id',$paiement->id,$user->rights->facture->paiement,'text');
+print ' '.$form->editfieldkey("Note",'note',$paiement->note,$paiement,$user->rights->facture->paiement).' ';
+print $form->editfieldval("Note",'note',$paiement->note,$paiement,$user->rights->facture->paiement,'text');
print ' ';
// Bank account
diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php
index a39bb7b9cb1..2e3d9df41dd 100755
--- a/htdocs/compta/paiement_charge.php
+++ b/htdocs/compta/paiement_charge.php
@@ -149,7 +149,7 @@ if ($_POST["action"] == 'add_payment')
llxHeader();
-$html=new Form($db);
+$form=new Form($db);
// Formulaire de creation d'un paiement de charge
@@ -207,12 +207,12 @@ if ($_GET["action"] == 'create')
print ''.$langs->trans("Date").' ';
$datepaye = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
$datepayment=empty($conf->global->MAIN_AUTOFILL_DATE)?(empty($_POST["remonth"])?-1:$datepaye):0;
- $html->select_date($datepayment,'','','','',"add_payment",1,1);
+ $form->select_date($datepayment,'','','','',"add_payment",1,1);
print " ";
print ''.$langs->trans("Comments").' ';
print ''.$langs->trans("PaymentMode").' ';
- $html->select_types_paiements(isset($_POST["paiementtype"])?$_POST["paiementtype"]:$charge->paiementtype, "paiementtype");
+ $form->select_types_paiements(isset($_POST["paiementtype"])?$_POST["paiementtype"]:$charge->paiementtype, "paiementtype");
print " \n";
print ' ';
@@ -220,7 +220,7 @@ if ($_GET["action"] == 'create')
print '';
print ''.$langs->trans('AccountToDebit').' ';
print '';
- $html->select_comptes(isset($_POST["accountid"])?$_POST["accountid"]:$charge->accountid, "accountid", 0, '',1); // Show opend bank account list
+ $form->select_comptes(isset($_POST["accountid"])?$_POST["accountid"]:$charge->accountid, "accountid", 0, '',1); // Show opend bank account list
print ' ';
print ''.$langs->trans('Numero');
diff --git a/htdocs/compta/payment_sc/fiche.php b/htdocs/compta/payment_sc/fiche.php
index 577fe00342b..6c4a53fbb51 100644
--- a/htdocs/compta/payment_sc/fiche.php
+++ b/htdocs/compta/payment_sc/fiche.php
@@ -124,7 +124,7 @@ if ($result <= 0)
exit;
}
-$html = new Form($db);
+$form = new Form($db);
$h=0;
@@ -146,7 +146,7 @@ dol_fiche_head($head, $hselected, $langs->trans("PaymentSocialContribution"), 0,
*/
if ($_GET['action'] == 'delete')
{
- $ret=$html->form_confirm('fiche.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2);
+ $ret=$form->form_confirm('fiche.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2);
if ($ret == 'html') print ' ';
}
@@ -156,7 +156,7 @@ if ($_GET['action'] == 'delete')
if ($_GET['action'] == 'valide')
{
$facid = $_GET['facid'];
- $ret=$html->form_confirm('fiche.php?id='.$paiement->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2);
+ $ret=$form->form_confirm('fiche.php?id='.$paiement->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2);
if ($ret == 'html') print ' ';
}
@@ -169,7 +169,7 @@ print '';
// Ref
print ''.$langs->trans('Ref').' ';
print '';
-print $html->showrefnav($paiement,'id','',1,'rowid','id');
+print $form->showrefnav($paiement,'id','',1,'rowid','id');
print ' ';
// Date
diff --git a/htdocs/compta/prelevement/bon.php b/htdocs/compta/prelevement/bon.php
index c9d27ba9346..67d7baee6ef 100644
--- a/htdocs/compta/prelevement/bon.php
+++ b/htdocs/compta/prelevement/bon.php
@@ -41,7 +41,7 @@ $result = restrictedArea($user, 'prelevement', $id);
llxHeader('','Bon de prelevement');
-$html = new Form($db);
+$form = new Form($db);
if ($id > 0 || ! empty($ref))
{
diff --git a/htdocs/compta/prelevement/fiche.php b/htdocs/compta/prelevement/fiche.php
index abe3798fc6a..4b76e9c3a02 100644
--- a/htdocs/compta/prelevement/fiche.php
+++ b/htdocs/compta/prelevement/fiche.php
@@ -110,7 +110,7 @@ if ($action == 'infocredit' && $user->rights->prelevement->bons->credit)
llxHeader('',$langs->trans("WithdrawalReceipt"));
-$html = new Form($db);
+$form = new Form($db);
if ($id)
{
@@ -128,7 +128,7 @@ if ($id)
if ($action == 'credite')
{
- $ret=$html->form_confirm("fiche.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite",'',1,1);
+ $ret=$form->form_confirm("fiche.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite",'',1,1);
if ($ret == 'html') print ' ';
}
@@ -181,10 +181,10 @@ if ($id)
print '';
print ''.$langs->trans("NotifyTransmision").' ';
print ''.$langs->trans("TransData").' ';
- print $html->select_date('','','','','',"userfile");
+ print $form->select_date('','','','','',"userfile");
print ' ';
print ''.$langs->trans("TransMetod").' ';
- print $html->selectarray("methode",$bon->methodes_trans);
+ print $form->selectarray("methode",$bon->methodes_trans);
print ' ';
print ''.$langs->trans("File").' ';
print ' ';
@@ -204,7 +204,7 @@ if ($id)
print ' ';
print ''.$langs->trans("NotifyCredit").' ';
print ''.$langs->trans('CreditDate').' ';
- print $html->select_date('','','','','',"infocredit");
+ print $form->select_date('','','','','',"infocredit");
print ' ';
print '
';
print ' ';
diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php
index 7dec4ce5f60..0914abbdc65 100644
--- a/htdocs/compta/prelevement/ligne.php
+++ b/htdocs/compta/prelevement/ligne.php
@@ -151,7 +151,7 @@ if ($id)
if ($action == 'rejet' && $user->rights->prelevement->bons->credit)
{
- $html = new Form($db);
+ $form = new Form($db);
$soc = new Societe($db);
$soc->fetch($lipre->socid);
@@ -169,25 +169,25 @@ if ($id)
//Select yes/no
print ''.$langs->trans("WithdrawalRefusedConfirm").' '.$soc->nom.' ? ';
print '';
- print $html->selectyesno("confirm",1,0);
+ print $form->selectyesno("confirm",1,0);
print ' ';
//Date
print ''.$langs->trans("RefusedData").' ';
print '';
- print $html->select_date('','','','','',"confirm_rejet");
+ print $form->select_date('','','','','',"confirm_rejet");
print ' ';
//Reason
print ''.$langs->trans("RefusedReason").' ';
print '';
- print $html->selectarray("motif", $rej->motifs);
+ print $form->selectarray("motif", $rej->motifs);
print ' ';
//Facturer
print ''.$langs->trans("RefusedInvoicing").' ';
print '';
- print $html->selectarray("facturer", $rej->facturer);
+ print $form->selectarray("facturer", $rej->facturer);
print ' ';
print '
';
diff --git a/htdocs/compta/propal.php b/htdocs/compta/propal.php
index 519ae0960d5..a379d7a5791 100644
--- a/htdocs/compta/propal.php
+++ b/htdocs/compta/propal.php
@@ -110,7 +110,7 @@ $now=gmmktime();
llxHeader();
-$html = new Form($db);
+$form = new Form($db);
$htmlother = new FormOther($db);
$formfile = new FormFile($db);
$societestatic=new Societe($db);
@@ -142,7 +142,7 @@ if ($id > 0 || ! empty($ref))
// Ref
print ''.$langs->trans('Ref').' ';
- print $html->showrefnav($object,'ref',$linkback,1,'ref','ref','');
+ print $form->showrefnav($object,'ref',$linkback,1,'ref','ref','');
print ' ';
// Ref client
@@ -216,11 +216,11 @@ if ($id > 0 || ! empty($ref))
print '';
if ($action == 'editconditions')
{
- $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->cond_reglement_id,'cond_reglement_id');
+ $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->cond_reglement_id,'cond_reglement_id');
}
else
{
- $html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->cond_reglement_id,'none');
+ $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->cond_reglement_id,'none');
}
print ' ';
@@ -235,11 +235,11 @@ if ($id > 0 || ! empty($ref))
print '';
if ($action == 'editmode')
{
- $html->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->mode_reglement_id,'mode_reglement_id');
+ $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->mode_reglement_id,'mode_reglement_id');
}
else
{
- $html->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->mode_reglement_id,'none');
+ $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id,$object->mode_reglement_id,'none');
}
print ' ';
@@ -257,11 +257,11 @@ if ($id > 0 || ! empty($ref))
print '';
if ($action == 'classify')
{
- $html->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'projectid');
+ $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'projectid');
}
else
{
- $html->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none');
+ $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none');
}
print ' ';
}
@@ -385,7 +385,7 @@ if ($id > 0 || ! empty($ref))
$text=$product_static->getNomUrl(1);
$text.= ' - '.$objp->product_label;
$description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($objp->description));
- print $html->textwithtooltip($text,$description,3,'','',$i);
+ print $form->textwithtooltip($text,$description,3,'','',$i);
// Show range
print_date_range($objp->date_start,$objp->date_end);
@@ -624,7 +624,7 @@ else
print ' ';
print '';
print '';
- $html->select_propal_statut($viewstatut);
+ $form->select_propal_statut($viewstatut);
print ' ';
print ' ';
print ' ';
diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php
index 9d24bbe3c48..8cc9a91858e 100644
--- a/htdocs/compta/resultat/clientfourn.php
+++ b/htdocs/compta/resultat/clientfourn.php
@@ -98,14 +98,14 @@ if ($_GET["modecompta"]) $modecompta=$_GET["modecompta"];
llxHeader();
-$html=new Form($db);
+$form=new Form($db);
// Affiche en-tete de rapport
if ($modecompta=="CREANCES-DETTES")
{
$nom=$langs->trans("AnnualByCompaniesDueDebtMode");
$nom.=' ('.$langs->trans("SeeReportInInputOutputMode",'0?'&month='.GETPOST("month"):'').'&modecompta=RECETTES-DEPENSES">',' ').')';
- $period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink=''.img_previous().' '.img_next().' ';
$description=$langs->trans("RulesResultDue");
$builddate=time();
@@ -114,8 +114,8 @@ if ($modecompta=="CREANCES-DETTES")
else {
$nom=$langs->trans("AnnualByCompaniesInputOutputMode");
$nom.=' ('.$langs->trans("SeeReportInDueDebtMode",'0?'&month='.GETPOST("month"):'').'&modecompta=CREANCES-DETTES">',' ').')';
- //$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',1,1,0,'',1,0,1);
- $period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ //$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',1,1,0,'',1,0,1);
+ $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink=''.img_previous().' '.img_next().' ';
$description=$langs->trans("RulesResultInOut");
$builddate=time();
diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php
index 35f3e1aedfe..df660159417 100644
--- a/htdocs/compta/resultat/index.php
+++ b/htdocs/compta/resultat/index.php
@@ -55,7 +55,7 @@ if ($_GET["modecompta"]) $modecompta=$_GET["modecompta"];
llxHeader();
-$html=new Form($db);
+$form=new Form($db);
// Affiche en-tete du rapport
if ($modecompta=="CREANCES-DETTES")
diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php
index e173fb38739..565f5a933bd 100644
--- a/htdocs/compta/sociales/charges.php
+++ b/htdocs/compta/sociales/charges.php
@@ -169,7 +169,7 @@ if ($_GET["action"] == 'update' && ! $_POST["cancel"] && $user->rights->tax->cha
llxHeader('',$langs->trans("SocialContribution"));
-$html = new Form($db);
+$form = new Form($db);
// Mode creation
if ($_GET["action"] == 'create')
@@ -213,18 +213,18 @@ if ($_GET["action"] == 'create')
// Type
print '';
- $html->select_type_socialcontrib(isset($_POST["actioncode"])?$_POST["actioncode"]:'','actioncode',1);
+ $form->select_type_socialcontrib(isset($_POST["actioncode"])?$_POST["actioncode"]:'','actioncode',1);
print ' ';
// Date end period
print '';
- print $html->select_date(! empty($dateperiod)?$dateperiod:'-1', 'period', 0, 0, 0, 'charge', 1);
+ print $form->select_date(! empty($dateperiod)?$dateperiod:'-1', 'period', 0, 0, 0, 'charge', 1);
print ' ';
print ' ';
print '';
- print $html->select_date(! empty($dateech)?$dateech:'-1', 'ech', 0, 0, 0, 'charge', 1);
+ print $form->select_date(! empty($dateech)?$dateech:'-1', 'ech', 0, 0, 0, 'charge', 1);
print ' ';
print ' ';
@@ -264,13 +264,13 @@ if ($chid > 0)
if ($_GET["action"] == 'paid')
{
$text=$langs->trans('ConfirmPaySocialContribution');
- print $html->formconfirm($_SERVER["PHP_SELF"]."?id=".$cha->id,$langs->trans('PaySocialContribution'),$text,"confirm_paid",'','',2);
+ print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$cha->id,$langs->trans('PaySocialContribution'),$text,"confirm_paid",'','',2);
}
if ($_GET['action'] == 'delete')
{
$text=$langs->trans('ConfirmDeleteSocialContribution');
- print $html->formconfirm($_SERVER['PHP_SELF'].'?id='.$cha->id,$langs->trans('DeleteSocialContribution'),$text,'confirm_delete','','',2);
+ print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$cha->id,$langs->trans('DeleteSocialContribution'),$text,'confirm_delete','','',2);
}
if ($_GET['action'] == 'edit')
@@ -283,7 +283,7 @@ if ($chid > 0)
// Ref
print "".$langs->trans("Ref").' ';
- print $html->showrefnav($cha,'id');
+ print $form->showrefnav($cha,'id');
print " ";
// Label
@@ -306,7 +306,7 @@ if ($chid > 0)
print "";
if ($_GET['action'] == 'edit')
{
- print $html->select_date($cha->periode, 'period', 0, 0, 0, 'charge', 1);
+ print $form->select_date($cha->periode, 'period', 0, 0, 0, 'charge', 1);
}
else
{
@@ -382,7 +382,7 @@ if ($chid > 0)
if ($_GET['action'] == 'edit')
{
print ' '.$langs->trans("DateDue")." ";
- print $html->select_date($cha->date_ech, 'ech', 0, 0, 0, 'charge', 1);
+ print $form->select_date($cha->date_ech, 'ech', 0, 0, 0, 'charge', 1);
print " ";
}
else {
diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php
index ec0d6286858..398e06e73d6 100644
--- a/htdocs/compta/sociales/index.php
+++ b/htdocs/compta/sociales/index.php
@@ -68,7 +68,7 @@ else
llxHeader();
-$html = new Form($db);
+$form = new Form($db);
$sql = "SELECT s.rowid as id, s.fk_type as type, ";
@@ -155,7 +155,7 @@ if ($resql)
print ' ';
// Type
print '';
- $html->select_type_socialcontrib($typeid,'typeid',1,16,0);
+ $form->select_type_socialcontrib($typeid,'typeid',1,16,0);
print ' ';
// Period end date
print ' ';
diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php
index da20dd3a7cd..c0f2a76c933 100644
--- a/htdocs/compta/stats/cabyuser.php
+++ b/htdocs/compta/stats/cabyuser.php
@@ -99,14 +99,14 @@ else
llxHeader();
-$html=new Form($db);
+$form=new Form($db);
// Affiche en-tete du rapport
if ($modecompta=="CREANCES-DETTES")
{
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
$nom.=' ('.$langs->trans("SeeReportInInputOutputMode",'',' ').')';
- $period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink="".img_previous()." ".img_next()." ";
$description=$langs->trans("RulesCADue");
$builddate=time();
@@ -115,7 +115,7 @@ if ($modecompta=="CREANCES-DETTES")
else {
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
$nom.=' ('.$langs->trans("SeeReportInDueDebtMode",'',' ').')';
- $period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink="".img_previous()." ".img_next()." ";
$description=$langs->trans("RulesCAIn");
$builddate=time();
diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php
index 4fbdbd7eaed..521045f1516 100644
--- a/htdocs/compta/stats/casoc.php
+++ b/htdocs/compta/stats/casoc.php
@@ -102,14 +102,14 @@ else
llxHeader();
-$html=new Form($db);
+$form=new Form($db);
// Affiche en-tete de rapport
if ($modecompta=="CREANCES-DETTES")
{
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
$nom.=' ('.$langs->trans("SeeReportInInputOutputMode",'',' ').')';
- $period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink=''.img_previous().' '.img_next().' ';
$description=$langs->trans("RulesCADue");
$builddate=time();
@@ -118,7 +118,7 @@ if ($modecompta=="CREANCES-DETTES")
else {
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
$nom.=' ('.$langs->trans("SeeReportInDueDebtMode",'',' ').')';
- $period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink=''.img_previous().' '.img_next().' ';
$description=$langs->trans("RulesCAIn");
$builddate=time();
diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php
index a243cfedc34..52c571298ce 100644
--- a/htdocs/compta/stats/index.php
+++ b/htdocs/compta/stats/index.php
@@ -54,7 +54,7 @@ if ($_GET["modecompta"]) $modecompta=$_GET["modecompta"];
*/
llxHeader();
-$html=new Form($db);
+$form=new Form($db);
// Affiche en-tete du rapport
if ($modecompta=="CREANCES-DETTES")
diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php
index 2a407140eb8..c6ee70849bf 100644
--- a/htdocs/compta/tva/clients.php
+++ b/htdocs/compta/tva/clients.php
@@ -88,7 +88,7 @@ $result = restrictedArea($user, 'tax', '', '', 'charges');
* View
*/
-$html=new Form($db);
+$form=new Form($db);
$company_static=new Societe($db);
$morequerystring='';
@@ -111,7 +111,7 @@ if ($modetax==1) // Calculate on invoice for goods and services
{
$nom=$langs->trans("VATReportByCustomersInDueDebtMode");
//$nom.=' ('.$langs->trans("SeeVATReportInInputOutputMode",'',' ').')';
- $period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink=($year_start?"".img_previous()." ".img_next()." ":"");
$description=$langs->trans("RulesVATDue");
//if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.=' '.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
@@ -134,7 +134,7 @@ if ($modetax==0) // Invoice for goods, payment for services
{
$nom=$langs->trans("VATReportByCustomersInInputOutputMode");
//$nom.=' ('.$langs->trans("SeeVATReportInDueDebtMode",'',' ').')';
- $period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
//$periodlink=($year_start?"".img_previous()." ".img_next()." ":"");
$description=$langs->trans("RulesVATIn");
//if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.=' '.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
diff --git a/htdocs/compta/tva/fiche.php b/htdocs/compta/tva/fiche.php
index a771790cf47..f2667f697e1 100644
--- a/htdocs/compta/tva/fiche.php
+++ b/htdocs/compta/tva/fiche.php
@@ -126,7 +126,7 @@ if ($_GET["action"] == 'delete')
llxHeader();
-$html = new Form($db);
+$form = new Form($db);
if ($id)
{
@@ -154,11 +154,11 @@ if ($_GET["action"] == 'create')
print "";
print ''.$langs->trans("DatePayment").' ';
- print $html->select_date($datep,"datep",'','','','add');
+ print $form->select_date($datep,"datep",'','','','add');
print ' ';
print ''.$langs->trans("DateValue").' ';
- print $html->select_date($datev,"datev",'','','','add');
+ print $form->select_date($datev,"datev",'','','','add');
print ' ';
// Label
@@ -170,11 +170,11 @@ if ($_GET["action"] == 'create')
if ($conf->banque->enabled)
{
print ''.$langs->trans("Account").' ';
- $html->select_comptes($_POST["accountid"],"accountid",0,"courant=1",1); // Affiche liste des comptes courant
+ $form->select_comptes($_POST["accountid"],"accountid",0,"courant=1",1); // Affiche liste des comptes courant
print ' ';
print ''.$langs->trans("PaymentMode").' ';
- $html->select_types_paiements($_POST["paiementtype"], "paiementtype");
+ $form->select_types_paiements($_POST["paiementtype"], "paiementtype");
print " \n";
print " ";
}
diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php
index c45a609d5a3..a74c8ae4a1e 100644
--- a/htdocs/compta/tva/quadri_detail.php
+++ b/htdocs/compta/tva/quadri_detail.php
@@ -104,7 +104,7 @@ foreach($listofparams as $param)
llxHeader('','','','',0,0,'','',$morequerystring);
-$html=new Form($db);
+$form=new Form($db);
$company_static=new Societe($db);
$invoice_customer=new Facture($db);
@@ -125,7 +125,7 @@ $fsearch.=' ';
if ($modetax==1) // Calculate on invoice for goods and services
{
$nom=$langs->trans("VATReportByQuartersInDueDebtMode");
- $period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
$prevyear=$year_start; $prevquarter=$q;
if ($prevquarter > 1) $prevquarter--;
else { $prevquarter=4; $prevyear--; }
@@ -155,7 +155,7 @@ if ($modetax==1) // Calculate on invoice for goods and services
if ($modetax==0) // Invoice for goods, payment for services
{
$nom=$langs->trans("VATReportByQuartersInInputOutputMode");
- $period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
+ $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
$prevyear=$year_start; $prevquarter=$q;
if ($prevquarter > 1) $prevquarter--;
else { $prevquarter=4; $prevyear--; }
diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php
index 514ca3a29a3..35e9f68e9ce 100644
--- a/htdocs/contact/fiche.php
+++ b/htdocs/contact/fiche.php
@@ -477,14 +477,14 @@ else
// Date To Birth
print ''.$langs->trans("DateToBirth").' ';
- $html=new Form($db);
+ $form=new Form($db);
if ($object->birthday)
{
- print $html->select_date($object->birthday,'birthday',0,0,0,"perso");
+ print $form->select_date($object->birthday,'birthday',0,0,0,"perso");
}
else
{
- print $html->select_date('','birthday',0,0,1,"perso");
+ print $form->select_date('','birthday',0,0,1,"perso");
}
print ' ';
diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php
index 9b6481b309b..50376df2e5c 100644
--- a/htdocs/contact/perso.php
+++ b/htdocs/contact/perso.php
@@ -131,8 +131,8 @@ if ($_GET["action"] == 'edit')
// Date To Birth
print ''.$langs->trans("DateToBirth").' ';
- $html=new Form($db);
- print $html->select_date($contact->birthday,'birthday',0,0,1,"perso");
+ $form=new Form($db);
+ print $form->select_date($contact->birthday,'birthday',0,0,1,"perso");
print ' ';
print ''.$langs->trans("Alert").': ';
diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php
index bee4163db93..938010289ee 100644
--- a/htdocs/contrat/contact.php
+++ b/htdocs/contrat/contact.php
@@ -108,7 +108,7 @@ if ($_GET["action"] == 'deleteline' && $user->rights->contrat->creer)
llxHeader('', $langs->trans("ContractCard"), "Contrat");
-$html = new Form($db);
+$form = new Form($db);
$formcompany= new FormCompany($db);
$contactstatic=new Contact($db);
$userstatic=new User($db);
@@ -208,7 +208,7 @@ if ($id > 0)
print ' ';
//$userAlreadySelected = $contrat->getListContactId('internal'); // On ne doit pas desactiver un contact deja selectionner car on doit pouvoir le seclectionner une deuxieme fois pour un autre type
- $html->select_users($user->id,'contactid',0,$userAlreadySelected);
+ $form->select_users($user->id,'contactid',0,$userAlreadySelected);
print ' ';
print '';
$formcompany->selectTypeContact($contrat, '', 'type','internal');
@@ -238,7 +238,7 @@ if ($id > 0)
print ' ';
print '';
- $nbofcontacts=$html->select_contacts($selectedCompany, '', 'contactid');
+ $nbofcontacts=$form->select_contacts($selectedCompany, '', 'contactid');
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
print ' ';
print '';
diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php
index c8a7e6b6b0c..528106c56e7 100644
--- a/htdocs/contrat/document.php
+++ b/htdocs/contrat/document.php
@@ -102,7 +102,7 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
*
*/
-$html = new Form($db);
+$form = new Form($db);
llxHeader("","",$langs->trans("CardProduct".$product->type));
diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php
index beccf9a85f8..33496cef4a0 100644
--- a/htdocs/contrat/fiche.php
+++ b/htdocs/contrat/fiche.php
@@ -464,7 +464,7 @@ if ($action == 'confirm_move' && $_REQUEST["confirm"] == 'yes')
llxHeader('',$langs->trans("ContractCard"),"Contrat");
$form = new Form($db);
-$html = new Form($db);
+$form = new Form($db);
$objectlignestatic=new ContratLigne($db);
@@ -644,7 +644,7 @@ else
// Ref du contrat
print ' '.$langs->trans("Ref").' ';
- print $html->showrefnav($object,'ref','',1,'ref','ref','');
+ print $form->showrefnav($object,'ref','',1,'ref','ref','');
print " ";
// Customer
@@ -918,7 +918,7 @@ else
*/
if ($_REQUEST["action"] == 'deleteline' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $object->lines[$cursorline-1]->id == $_GET["rowid"])
{
- $ret=$html->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".$_GET["rowid"],$langs->trans("DeleteContractLine"),$langs->trans("ConfirmDeleteContractLine"),"confirm_deleteline",'',0,1);
+ $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".$_GET["rowid"],$langs->trans("DeleteContractLine"),$langs->trans("ConfirmDeleteContractLine"),"confirm_deleteline",'',0,1);
if ($ret == 'html') print '';
}
@@ -938,7 +938,7 @@ else
'text' => $langs->trans("ConfirmMoveToAnotherContractQuestion"),
array('type' => 'select', 'name' => 'newcid', 'values' => $arraycontractid));
- $html->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".$_GET["rowid"],$langs->trans("MoveToAnotherContract"),$langs->trans("ConfirmMoveToAnotherContract"),"confirm_move",$formquestion);
+ $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".$_GET["rowid"],$langs->trans("MoveToAnotherContract"),$langs->trans("ConfirmMoveToAnotherContract"),"confirm_move",$formquestion);
print '';
}
@@ -950,7 +950,7 @@ else
$dateactstart = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
$dateactend = dol_mktime(12, 0, 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]);
$comment = $_POST["comment"];
- $html->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment),$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dol_print_date($dateactstart,"%A %d %B %Y")),"confirm_active", '', 0, 1);
+ $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment),$langs->trans("ActivateService"),$langs->trans("ConfirmActivateService",dol_print_date($dateactstart,"%A %d %B %Y")),"confirm_active", '', 0, 1);
print '';
}
@@ -962,7 +962,7 @@ else
$dateactstart = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
$dateactend = dol_mktime(12, 0, 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]);
$comment = $_POST["comment"];
- $html->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("CloseService"), $langs->trans("ConfirmCloseService",dol_print_date($dateactend,"%A %d %B %Y")), "confirm_closeline", '', 0, 1);
+ $form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".$_GET["ligne"]."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("CloseService"), $langs->trans("ConfirmCloseService",dol_print_date($dateactend,"%A %d %B %Y")), "confirm_closeline", '', 0, 1);
print '';
}
@@ -1049,11 +1049,11 @@ else
}
print ''.$langs->trans("DateServiceActivate").' ';
- print $html->select_date($dateactstart,'',$usehm,$usehm,'',"active");
+ print $form->select_date($dateactstart,'',$usehm,$usehm,'',"active");
print ' ';
print ''.$langs->trans("DateEndPlanned").' ';
- print $html->select_date($dateactend,"end",$usehm,$usehm,'',"active");
+ print $form->select_date($dateactend,"end",$usehm,$usehm,'',"active");
print ' ';
print '';
diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php
index 8c4cc75f721..6554e5ad8c1 100644
--- a/htdocs/contrat/note.php
+++ b/htdocs/contrat/note.php
@@ -88,7 +88,7 @@ if ($_POST["action"] == 'update' && $user->rights->contrat->creer)
llxHeader();
-$html = new Form($db);
+$form = new Form($db);
if ($_GET["id"])
{
diff --git a/htdocs/core/ajax/loadinplace.php b/htdocs/core/ajax/loadinplace.php
index e4ea090d0cf..166d6d3507d 100644
--- a/htdocs/core/ajax/loadinplace.php
+++ b/htdocs/core/ajax/loadinplace.php
@@ -66,8 +66,18 @@ if((isset($_GET['field']) && ! empty($_GET['field']))
$cachename = 'cache_'.GETPOST('method');
$form = new Form($db);
- $ret = $form->$methodname();
- if ($ret > 0) echo json_encode($form->$cachename);
+ if (method_exists($form, $methodname))
+ {
+ $ret = $form->$methodname();
+ if ($ret > 0) echo json_encode($form->$cachename);
+ }
+ else
+ {
+ dol_include_once('/'.$element.'/class/'.$element.'.class.php');
+ $classname = ucfirst($element);
+ $object = new $classname($db);
+ print_r($object);
+ }
}
else
{
diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php
index fc392775744..20f12c52180 100644
--- a/htdocs/core/class/CMailFile.class.php
+++ b/htdocs/core/class/CMailFile.class.php
@@ -63,10 +63,10 @@ class CMailFile
var $bodyCSS;
// Image
- var $html;
+ var $form;
var $image_boundary;
var $atleastoneimage=0;
- var $html_images=array();
+ var $form_images=array();
var $images_encoded=array();
var $image_types = array('gif' => 'image/gif',
'jpg' => 'image/jpeg',
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index ab459e2c2fc..8893dbdbbbd 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -1908,12 +1908,12 @@ abstract class CommonObject
* @param int $dateSelector 1=Show also date range input fields
* @param Societe $seller Object thirdparty who sell
* @param Societe $buyer Object thirdparty who buy
- * @param HookManager $hookmanager Hook manager instance
- */
- function formAddPredefinedProduct($dateSelector,$seller,$buyer,$hookmanager=false)
- {
- global $conf,$langs,$object;
- global $html,$bcnd,$var;
+ * @param HookManager $hookmanager Hook manager instance
+ */
+ function formAddPredefinedProduct($dateSelector,$seller,$buyer,$hookmanager=false)
+ {
+ global $conf,$langs,$object;
+ global $form,$bcnd,$var;
// Use global variables + $dateSelector + $seller and $buyer
include(DOL_DOCUMENT_ROOT.'/core/tpl/predefinedproductline_create.tpl.php');
@@ -1929,10 +1929,10 @@ abstract class CommonObject
* @param Societe $buyer Object thirdparty who buy
* @param HookManager $hookmanager Hook manager instance
*/
- function formAddFreeProduct($dateSelector,$seller,$buyer,$hookmanager=false)
- {
- global $conf,$langs,$object;
- global $html,$bcnd,$var;
+ function formAddFreeProduct($dateSelector,$seller,$buyer,$hookmanager=false)
+ {
+ global $conf,$langs,$object;
+ global $form,$bcnd,$var;
// Use global variables + $dateSelector + $seller and $buyer
include(DOL_DOCUMENT_ROOT.'/core/tpl/freeproductline_create.tpl.php');
@@ -2031,11 +2031,11 @@ abstract class CommonObject
* @param $seller Object of seller third party
* @param $buyer Object of buyer third party
* @param $selected Object line selected
- */
- function printLine($action='viewline',$line,$var=true,$num=0,$i=0,$dateSelector=0,$seller,$buyer,$selected=0,$hookmanager=false)
- {
- global $conf,$langs,$user;
- global $html,$bc,$bcdd;
+ */
+ function printLine($action='viewline',$line,$var=true,$num=0,$i=0,$dateSelector=0,$seller,$buyer,$selected=0,$hookmanager=false)
+ {
+ global $conf,$langs,$user;
+ global $form,$bc,$bcdd;
$element = $this->element;
if ($element == 'propal') $element = 'propale'; // To work with non standard path
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 3d75a31e99f..0983d2940da 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -68,16 +68,15 @@ class Form
/**
* Output key field for an editable field
*
- * @param string $text Text of label or key to translate
- * @param string $htmlname Name of select field
- * @param string $preselected Value to show/edit
- * @param string $paramkey Key of parameter for Url (unique if there is several parameter to show). In most cases "id".
- * @param string $paramvalue Value of parameter for Url
- * @param boolean $perm Permission to allow button to edit parameter
+ * @param string $text Text of label or key to translate
+ * @param string $htmlname Name of select field
+ * @param string $preselected Name of Value to show/edit (not used in this function)
+ * @param object $object Object
+ * @param boolean $perm Permission to allow button to edit parameter
* @param string $typeofdata Type of data ('string' by default, 'email', 'numeric:99', 'text' or 'textarea', 'day' or 'datepicker', 'ckeditor:dolibarr_zzz:width:height', 'select:xxx'...)
- * @return string HTML edit field
+ * @return string HTML edit field
*/
- function editfieldkey($text,$htmlname,$preselected,$paramkey,$paramvalue,$perm,$typeofdata='string')
+ function editfieldkey($text,$htmlname,$preselected,$object,$perm,$typeofdata='string')
{
global $conf,$langs;
@@ -102,7 +101,7 @@ class Form
$ret.='';
}
@@ -115,13 +114,13 @@ class Form
* @param string $text Text of label (not used in this function)
* @param string $htmlname Name of select field
* @param string $value Value to show/edit
- * @param string $paramkey Key of parameter (unique if there is several parameter to show). In most cases "id".
+ * @param object $object Object
* @param boolean $perm Permission to allow button to edit parameter
* @param string $typeofdata Type of data ('string' by default, 'email', 'numeric:99', 'text' or 'textarea', 'day' or 'datepicker', 'ckeditor:dolibarr_zzz:width:height', 'select:xxx'...)
* @param string $editvalue When in edit mode, use this value as $value instead of value
- * @return string HTML edit field
+ * @return string HTML edit field
*/
- function editfieldval($text,$htmlname,$value,$paramkey,$paramvalue,$perm,$typeofdata='string',$editvalue='')
+ function editfieldval($text,$htmlname,$value,$object,$perm,$typeofdata='string',$editvalue='')
{
global $conf,$langs,$db;
$ret='';
@@ -129,7 +128,7 @@ class Form
// When option to edit inline is activated
if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE))
{
- $ret.=$this->editInPlace($value, $htmlname, $perm, $typeofdata);
+ $ret.=$this->editInPlace($object, $value, $htmlname, $perm, $typeofdata);
}
else
{
@@ -139,7 +138,7 @@ class Form
$ret.='