diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php
index b77759b98a3..a6da2fc01ce 100644
--- a/htdocs/adherents/card.php
+++ b/htdocs/adherents/card.php
@@ -1031,7 +1031,7 @@ else
// Categories
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
{
- print '
';
- print '';
- print $langs->trans("LinkedToDolibarrUser");
- print ' ';
- if ($action != 'editlogin' && $user->rights->adherent->creer)
- {
- print '';
- if ($user->rights->user->user->creer)
- {
- print 'id.'">'.img_edit($langs->trans('SetLinkToUser'),1).' ';
- }
- print ' ';
- }
- print '
';
+ $editenable = $user->rights->adherent->creer && $user->rights->user->user->creer;
+ print $form->editfieldkey('LinkedToDolibarrUser', 'login', '', $object, $editenable);
print ' ';
if ($action == 'editlogin')
{
diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index 0b5d4a47642..a0bfeba418d 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -10,8 +10,8 @@
* Copyright (C) 2012-2013 Christophe Battarel
* Copyright (C) 2012 Cedric Salvador
* Copyright (C) 2013-2014 Florian Henry
- * Copyright (C) 2014 Ferran Marcet
- * Copyright (C) 2016 Marcos García
+ * Copyright (C) 2014 Ferran Marcet
+ * Copyright (C) 2016 Marcos García
* Copyright (C) 2018 Frédéric France
*
* This program is free software; you can redistribute it and/or modify
@@ -1709,7 +1709,7 @@ if ($action == 'create')
if (! empty($conf->multicurrency->enabled))
{
print '';
- print ''.fieldLabel('Currency','multicurrency_code').' ';
+ print ''.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).' ';
print '';
print $form->selectMultiCurrency($currency_code, 'multicurrency_code', 0);
print ' ';
@@ -2200,7 +2200,7 @@ if ($action == 'create')
print '';
print '';
print '';
- print fieldLabel('Currency','multicurrency_code');
+ print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0);
print ' ';
if ($action != 'editmulticurrencycode' && ! empty($object->brouillon) && $usercancreate)
print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ' ';
@@ -2217,7 +2217,7 @@ if ($action == 'create')
print '';
print '';
print '';
- print fieldLabel('CurrencyRate','multicurrency_tx');
+ print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0);
print ' ';
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency && $usercancreate)
print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ' ';
@@ -2325,17 +2325,17 @@ if ($action == 'create')
if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code != $conf->currency))
{
// Multicurrency Amount HT
- print '' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . ' ';
+ print '' . $form->editfieldkey('MulticurrencyAmountHT', 'multicurrency_total_ht', '', $object, 0) . ' ';
print '' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . ' ';
print ' ';
// Multicurrency Amount VAT
- print '' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . ' ';
+ print '' . $form->editfieldkey('MulticurrencyAmountVAT', 'multicurrency_total_tva', '', $object, 0) . ' ';
print '' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . ' ';
print ' ';
// Multicurrency Amount TTC
- print '' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . ' ';
+ print '' . $form->editfieldkey('MulticurrencyAmountTTC', 'multicurrency_total_ttc', '', $object, 0) . ' ';
print '' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . ' ';
print ' ';
}
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index edaca88a841..770fc141db8 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -106,7 +106,8 @@ $permissionedit = $user->rights->commande->creer; // Used by the include of ac
*/
$parameters = array('socid' => $socid);
-$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
+// Note that $action and $object may be modified by some hooks
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action);
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
if (empty($reshook))
@@ -419,10 +420,11 @@ if (empty($reshook))
// Hooks
$parameters = array('objFrom' => $srcobject);
- $reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been
- // modified by hook
- if ($reshook < 0)
+ // Note that $action and $object may be modified by hook
+ $reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action);
+ if ($reshook < 0) {
$error++;
+ }
} else {
setEventMessages($object->error, $object->errors, 'errors');
$error++;
@@ -1751,7 +1753,8 @@ if ($action == 'create' && $user->rights->commande->creer)
// Other attributes
$parameters = array('objectsrc' => $objectsrc, 'socid'=>$socid);
- $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by
+ // Note that $action and $object may be modified by hook
+ $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action);
print $hookmanager->resPrint;
if (empty($reshook)) {
print $object->showOptionals($extrafields, 'edit');
@@ -1769,7 +1772,7 @@ if ($action == 'create' && $user->rights->commande->creer)
if (! empty($conf->multicurrency->enabled))
{
print '';
- print ''.fieldLabel('Currency','multicurrency_code').' ';
+ print ''.$form->editfieldkey("Currency", 'multicurrency_code', '', $object, 0).' ';
print '';
print $form->selectMultiCurrency($currency_code, 'multicurrency_code');
print ' ';
@@ -2051,7 +2054,8 @@ if ($action == 'create' && $user->rights->commande->creer)
// Call Hook formConfirm
$parameters = array('lineid' => $lineid);
- $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
+ // Note that $action and $object may be modified by hook
+ $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action);
if (empty($reshook)) $formconfirm.=$hookmanager->resPrint;
elseif ($reshook > 0) $formconfirm=$hookmanager->resPrint;
@@ -2156,13 +2160,8 @@ if ($action == 'create' && $user->rights->commande->creer)
// Date
print '';
- print '';
+ $editenable = $user->rights->commande->creer && $object->statut == Commande::STATUS_DRAFT;
+ print $form->editfieldkey("Date", 'date', '', $object, $editenable);
print ' ';
if ($action == 'editdate') {
print '
';
@@ -2576,8 +2524,8 @@ if ($action == 'create' && $user->rights->commande->creer)
print '';
$parameters = array();
- $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
- // modified by hook
+ // Note that $action and $object may be modified by hook
+ $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action);
if (empty($reshook)) {
// Send
if ($object->statut > Commande::STATUS_DRAFT) {
@@ -2600,10 +2548,11 @@ if ($action == 'create' && $user->rights->commande->creer)
print '
';
}
// Create event
- /*if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a
- // "workflow" action so should appears somewhere else on
- // page.
+ /*if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD))
{
+ // Add hidden condition because this is not a
+ // "workflow" action so should appears somewhere else on
+ // page.
print '
' . $langs->trans("AddAction") . ' ';
}*/
diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php
index 4b9f55f025f..c77f99ba667 100644
--- a/htdocs/compta/bank/ligne.php
+++ b/htdocs/compta/bank/ligne.php
@@ -596,7 +596,7 @@ if ($result)
$langs->load('categories');
// Bank line
- print '
' . fieldLabel('RubriquesTransactions', 'custcats') . ' ';
+ print ' ' . $form->editfieldkey('RubriquesTransactions', 'custcats', '', $object, 0) . ' ';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_BANK_LINE, null, 'parent', null, null, 1);
print $form->multiselectarray('custcats', $cate_arbo, $arrayselected, null, null, null, null, "90%");
print " ";
diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php
index 0f417777417..9afe670230a 100644
--- a/htdocs/compta/bank/various_payment/card.php
+++ b/htdocs/compta/bank/various_payment/card.php
@@ -256,32 +256,32 @@ if ($action == 'create')
// Date payment
print '
';
- print fieldLabel('DatePayment','datep',1).' ';
+ print $form->editfieldkey('DatePayment', 'datep', '', $object, 0, 'string', '', 1).' ';
print $form->selectDate((empty($datep)?-1:$datep),"datep",'','','','add',1,1);
print ' ';
// Date value for bank
print '
';
- print fieldLabel('DateValue','datev',0).' ';
+ print $form->editfieldkey('DateValue', 'datev', '', $object, 0).' ';
print $form->selectDate((empty($datev)?-1:$datev),"datev",'','','','add',1,1);
print ' ';
// Label
print '
';
- print fieldLabel('Label','label',1).' ';
+ print $form->editfieldkey('Label', 'label', '', $object, 0, 'string', '', 1).' ';
print ' ';
print ' ';
// Sens
print '
';
- print fieldLabel('Sens','sens',1).' ';
+ print $form->editfieldkey('Sens', 'sens', '', $object, 0, 'string', '', 1).' ';
$sensarray=array( '0' => $langs->trans("Debit"), '1' => $langs->trans("Credit"));
print $form->selectarray('sens',$sensarray,$sens);
print ' ';
// Amount
print '
';
- print fieldLabel('Amount','amount',1).' ';
+ print $form->editfieldkey('Amount', 'amount', '', $object, 0, 'string', '', 1).' ';
print ' ';
print ' ';
@@ -289,14 +289,14 @@ if ($action == 'create')
if (! empty($conf->banque->enabled))
{
print '
';
- print fieldLabel('BankAccount','selectaccountid',1).' ';
+ print $form->editfieldkey('BankAccount', 'selectaccountid', '', $object, 0, 'string', '', 1).' ';
$form->select_comptes($accountid,"accountid",0,'',1); // Affiche liste des comptes courant
print ' ';
}
// Type payment
print '
';
- print fieldLabel('PaymentMode','selectpaymenttype',1).' ';
+ print $form->editfieldkey('PaymentMode', 'selectpaymenttype', '', $object, 0, 'string', '', 1).' ';
$form->select_types_paiements($paymenttype, "paymenttype");
print ' ';
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index f8dd8e377f7..a734f850fb9 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -3213,7 +3213,7 @@ if ($action == 'create')
if (! empty($conf->multicurrency->enabled))
{
print '
';
- print ''.fieldLabel('Currency','multicurrency_code').' ';
+ print ''.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).' ';
print '';
print $form->selectMultiCurrency($currency_code, 'multicurrency_code');
print ' ';
@@ -3915,7 +3915,7 @@ else if ($id > 0 || ! empty($ref))
print '
';
print '';
print '';
- print fieldLabel('Currency','multicurrency_code');
+ print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0);
print ' ';
if ($usercancreate && $action != 'editmulticurrencycode' && ! empty($object->brouillon))
print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ' ';
@@ -3928,7 +3928,7 @@ else if ($id > 0 || ! empty($ref))
print '';
print '';
print '';
- print fieldLabel('CurrencyRate','multicurrency_tx');
+ print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0);
print ' ';
if ($usercancreate && $action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency)
print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ' ';
@@ -4014,17 +4014,17 @@ else if ($id > 0 || ! empty($ref))
if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code != $conf->currency))
{
// Multicurrency Amount HT
- print '' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . ' ';
+ print '' . $form->editfieldkey('MulticurrencyAmountHT', 'multicurrency_total_ht', '', $object, 0) . ' ';
print '' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . ' ';
print ' ';
// Multicurrency Amount VAT
- print '' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . ' ';
+ print '' . $form->editfieldkey('MulticurrencyAmountVAT', 'multicurrency_total_tva', '', $object, 0) . ' ';
print '' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . ' ';
print ' ';
// Multicurrency Amount TTC
- print '' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . ' ';
+ print '' . $form->editfieldkey('MulticurrencyAmountTTC', 'multicurrency_total_ttc', '', $object, 0) . ' ';
print '' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . ' ';
print ' ';
}
diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php
index 3fe5d777878..db3e1b0ef86 100644
--- a/htdocs/compta/facture/prelevement.php
+++ b/htdocs/compta/facture/prelevement.php
@@ -5,6 +5,7 @@
* Copyright (C) 2005-2012 Regis Houssin
* Copyright (C) 2010-2014 Juanjo Menent
* Copyright (C) 2017 Ferran Marcet
+ * Copyright (C) 2018 Frédéric France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -402,17 +403,17 @@ if ($object->id > 0)
if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code != $conf->currency))
{
// Multicurrency Amount HT
- print '' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . ' ';
+ print '' . $form->editfieldkey('MulticurrencyAmountHT', 'multicurrency_total_ht', '', $object, 0) . ' ';
print '' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . ' ';
print ' ';
// Multicurrency Amount VAT
- print '' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . ' ';
+ print '' . $form->editfieldkey('MulticurrencyAmountVAT', 'multicurrency_total_tva', '', $object, 0) . ' ';
print '' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . ' ';
print ' ';
// Multicurrency Amount TTC
- print '' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . ' ';
+ print '' . $form->editfieldkey('MulticurrencyAmountTTC', 'multicurrency_total_ttc', '', $object, 0) . ' ';
print '' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . ' ';
print ' ';
}
diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php
index 2e48802a554..9d98d6cf0ee 100644
--- a/htdocs/compta/salaries/card.php
+++ b/htdocs/compta/salaries/card.php
@@ -1,8 +1,8 @@
- * Copyright (C) 2014 Laurent Destailleur
- * Copyright (C) 2015 Jean-François Ferry
- * Copyright (C) 2015 Charlie BENKE
+/* Copyright (C) 2011-2018 Alexandre Spangaro
+ * Copyright (C) 2014 Laurent Destailleur
+ * Copyright (C) 2015 Jean-François Ferry
+ * Copyright (C) 2015 Charlie BENKE
* Copyright (C) 2018 Frédéric France
*
* This program is free software; you can redistribute it and/or modify
@@ -255,44 +255,44 @@ if ($action == 'create')
// Date payment
print '';
- print fieldLabel('DatePayment','datep',1).' ';
+ print $form->editfieldkey('DatePayment', 'datep', '', $object, 0, 'string', '', 1).' ';
print $form->selectDate((empty($datep)?-1:$datep), "datep", '', '', '', 'add', 1, 1);
print ' ';
// Date value for bank
print '';
- print fieldLabel('DateValue','datev',0).' ';
+ print $form->editfieldkey('DateValue', 'datev', '', $object, 0).' ';
print $form->selectDate((empty($datev)?-1:$datev), "datev", '', '', '', 'add', 1, 1);
print ' ';
// Employee
print '';
- print fieldLabel('Employee','fk_user',1).' ';
+ print $form->editfieldkey('Employee', 'fk_user', '', $object, 0, 'string', '', 1).' ';
$noactive=0; // We keep active and unactive users
print $form->select_dolusers(GETPOST('fk_user','int'), 'fk_user', 1, '', 0, '', '', 0, 0, 0, 'AND employee=1', 0, '', 'maxwidth300', $noactive);
print ' ';
// Label
print '';
- print fieldLabel('Label','label',1).' ';
+ print $form->editfieldkey('Label', 'label', '', $object, 0, 'string', '', 1).' ';
print ' trans("SalaryPayment")).'">';
print ' ';
// Date start period
print '';
- print fieldLabel('DateStartPeriod','datesp',1).' ';
+ print $form->editfieldkey('DateStartPeriod', 'datesp', '', $object, 0, 'string', '', 1).' ';
print $form->selectDate($datesp, "datesp", '', '', '', 'add');
print ' ';
// Date end period
print '';
- print fieldLabel('DateEndPeriod','dateep',1).' ';
+ print $form->editfieldkey('DateEndPeriod', 'dateep', '', $object, 0, 'string', '', 1).' ';
print $form->selectDate($dateep, "dateep", '', '', '', 'add');
print ' ';
// Amount
print '';
- print fieldLabel('Amount','amount',1).' ';
+ print $form->editfieldkey('Amount', 'amount', '', $object, 0, 'string', '', 1).' ';
print ' ';
print ' ';
@@ -312,14 +312,14 @@ if ($action == 'create')
if (! empty($conf->banque->enabled))
{
print '';
- print fieldLabel('BankAccount','selectaccountid',1).' ';
+ print $form->editfieldkey('BankAccount', 'selectaccountid', '', $object, 0, 'string', '', 1).' ';
$form->select_comptes($_POST["accountid"],"accountid",0,'',1); // Affiche liste des comptes courant
print ' ';
}
// Type payment
print '';
- print fieldLabel('PaymentMode','selectpaymenttype',1).' ';
+ print $form->editfieldkey('PaymentMode', 'selectpaymenttype', '', $object, 0, 'string', '', 1).' ';
$form->select_types_paiements(GETPOST("paymenttype"), "paymenttype", '', 2);
print ' ';
diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php
index 781e665b562..c40710ceb56 100644
--- a/htdocs/contact/card.php
+++ b/htdocs/contact/card.php
@@ -226,7 +226,7 @@ if (empty($reshook))
$action = 'create';
} else {
// Categories association
- $contcats = GETPOST( 'contcats', 'array');
+ $contcats = GETPOST('contcats', 'array');
$object->setCategories($contcats);
}
}
@@ -381,10 +381,10 @@ if (empty($reshook))
// First we delete all categories association
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . 'categorie_contact';
$sql .= ' WHERE fk_socpeople = ' . $object->id;
- $db->query( $sql );
+ $db->query($sql);
// Then we add the associated categories
- $categories = GETPOST( 'contcats', 'array');
+ $categories = GETPOST('contcats', 'array');
$object->setCategories($categories);
$object->old_lastname='';
@@ -688,19 +688,19 @@ else
// Skype
if (! empty($conf->global->SOCIALNETWORKS_SKYPE))
{
- print ''.fieldLabel('Skype','skype').' ';
+ print ''.$form->editfieldkey('Skype', 'skype', '', $object, 0).' ';
print ' skype).'"> ';
}
// Twitter
if (! empty($conf->global->SOCIALNETWORKS_TWITTER))
{
- print ''.fieldLabel('Twitter','twitter').' ';
+ print ''.$form->editfieldkey('Twitter', 'twitter', '', $object, 0).' ';
print 'twitter).'"> ';
}
// Facebook
if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK))
{
- print ''.fieldLabel('Facebook','facebook').' ';
+ print ''.$form->editfieldkey('Facebook', 'facebook', '', $object, 0).' ';
print ' facebook).'"> ';
}
}
@@ -713,10 +713,9 @@ else
// Categories
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) {
- print '' . fieldLabel( 'Categories', 'contcats' ) . ' ';
- $cate_arbo = $form->select_all_categories( Categorie::TYPE_CONTACT, null, 'parent', null, null, 1 );
- print $form->multiselectarray( 'contcats', $cate_arbo, GETPOST( 'contcats', 'array' ), null, null, null,
- null, '90%' );
+ print ' ' . $form->editfieldkey('Categories', 'contcats', '', $object, 0) . ' ';
+ $cate_arbo = $form->select_all_categories(Categorie::TYPE_CONTACT, null, 'parent', null, null, 1);
+ print $form->multiselectarray('contcats', $cate_arbo, GETPOST('contcats', 'array'), null, null, null, null, '90%');
print " ";
}
@@ -975,19 +974,19 @@ else
// Skype
if (! empty($conf->global->SOCIALNETWORKS_SKYPE))
{
- print ''.fieldLabel('Skype','skype').' ';
+ print ''.$form->editfieldkey('Skype', 'skype', '', $object, 0).' ';
print ' skype).'"> ';
}
// Twitter
if (! empty($conf->global->SOCIALNETWORKS_TWITTER))
{
- print ''.fieldLabel('Twitter','twitter').' ';
+ print ''.$form->editfieldkey('Twitter', 'twitter', '', $object, 0).' ';
print 'twitter).'"> ';
}
// Facebook
if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK))
{
- print ''.fieldLabel('Facebook','facebook').' ';
+ print ''.$form->editfieldkey('Facebook', 'facebook', '', $object, 0).' ';
print ' facebook).'"> ';
}
}
@@ -1017,16 +1016,16 @@ else
print '';
// Categories
- if (!empty( $conf->categorie->enabled ) && !empty( $user->rights->categorie->lire )) {
- print '' . fieldLabel( 'Categories', 'contcats' ) . ' ';
+ if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
+ print '' . $form->editfieldkey('Categories', 'contcats', '', $object, 0) . ' ';
print '';
- $cate_arbo = $form->select_all_categories( Categorie::TYPE_CONTACT, null, null, null, null, 1 );
- $c = new Categorie( $db );
- $cats = $c->containing( $object->id, 'contact' );
+ $cate_arbo = $form->select_all_categories(Categorie::TYPE_CONTACT, null, null, null, null, 1);
+ $c = new Categorie($db);
+ $cats = $c->containing($object->id, 'contact');
foreach ($cats as $cat) {
$arrayselected[] = $cat->id;
}
- print $form->multiselectarray( 'contcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%' );
+ print $form->multiselectarray('contcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%');
print " ";
}
@@ -1138,10 +1137,10 @@ else
$password=$generated_password;
// Create a form array
- $formquestion=array(
- array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login),
- array('label' => $langs->trans("Password"), 'type' => 'text', 'name' => 'password', 'value' => $password),
- //array('label' => $form->textwithpicto($langs->trans("Type"),$langs->trans("InternalExternalDesc")), 'type' => 'select', 'name' => 'intern', 'default' => 1, 'values' => array(0=>$langs->trans('Internal'),1=>$langs->trans('External')))
+ $formquestion = array(
+ array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login),
+ array('label' => $langs->trans("Password"), 'type' => 'text', 'name' => 'password', 'value' => $password),
+ //array('label' => $form->textwithpicto($langs->trans("Type"),$langs->trans("InternalExternalDesc")), 'type' => 'select', 'name' => 'intern', 'default' => 1, 'values' => array(0=>$langs->trans('Internal'),1=>$langs->trans('External')))
);
$text=$langs->trans("ConfirmCreateContact").' ';
if (! empty($conf->societe->enabled))
@@ -1225,7 +1224,7 @@ else
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) {
print '' . $langs->trans("Categories") . ' ';
print '';
- print $form->showCategories( $object->id, 'contact', 1 );
+ print $form->showCategories($object->id, 'contact', 1);
print ' ';
}
diff --git a/htdocs/core/tpl/notes.tpl.php b/htdocs/core/tpl/notes.tpl.php
index 39e5c545f1b..64774210162 100644
--- a/htdocs/core/tpl/notes.tpl.php
+++ b/htdocs/core/tpl/notes.tpl.php
@@ -18,8 +18,7 @@
*/
// Protection to avoid direct call of template
-if (empty($object) || ! is_object($object))
-{
+if (empty($object) || ! is_object($object)) {
print "Error, template page can't be called as URL";
exit;
}
diff --git a/htdocs/datapolicy/admin/setupmail.php b/htdocs/datapolicy/admin/setupmail.php
index 214f673a15f..f50fa08d31c 100644
--- a/htdocs/datapolicy/admin/setupmail.php
+++ b/htdocs/datapolicy/admin/setupmail.php
@@ -91,9 +91,6 @@ $head = datapolicyAdminPrepareHead();
dol_fiche_head($head, 'settings', '', -1, "datapolicy@datapolicy");
-
-
-
print "