diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php
index 1587c5c10e8..2d4ac69c288 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 '
';
print '';
print '';
- print fieldLabel('Currency','multicurrency_code');
+ print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0);
print ' ';
if ($action != 'editmulticurrencycode' && ! empty($object->brouillon))
print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ' ';
@@ -3915,7 +3915,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 ($action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency)
print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ' ';
@@ -4001,17 +4001,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 d7766268989..7c8ffb7d417 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 f50d940a51a..c67982ed9c5 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 a43127c9a32..e995352c38d 100644
--- a/htdocs/contact/card.php
+++ b/htdocs/contact/card.php
@@ -227,7 +227,7 @@ if (empty($reshook))
$action = 'create';
} else {
// Categories association
- $contcats = GETPOST( 'contcats', 'array');
+ $contcats = GETPOST('contcats', 'array');
$object->setCategories($contcats);
}
}
@@ -383,10 +383,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='';
@@ -669,19 +669,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).'"> ';
}
}
@@ -694,10 +694,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 " ";
}
@@ -938,19 +937,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).'"> ';
}
}
@@ -980,16 +979,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 " ";
}
@@ -1101,10 +1100,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))
@@ -1176,7 +1175,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/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 "