forked from Wavyzz/dolibarr
remove fieldlabel and add fieldeditkey
This commit is contained in:
@@ -596,7 +596,7 @@ if ($result)
|
||||
$langs->load('categories');
|
||||
|
||||
// Bank line
|
||||
print '<tr><td class="toptd">' . fieldLabel('RubriquesTransactions', 'custcats') . '</td><td>';
|
||||
print '<tr><td class="toptd">' . $form->editfieldkey('RubriquesTransactions', 'custcats', '', $object, 0) . '</td><td>';
|
||||
$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 "</td></tr>";
|
||||
|
||||
@@ -3196,7 +3196,7 @@ if ($action == 'create')
|
||||
if (! empty($conf->multicurrency->enabled))
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td>'.fieldLabel('Currency','multicurrency_code').'</td>';
|
||||
print '<td>'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>';
|
||||
print '<td colspan="2" class="maxwidthonsmartphone">';
|
||||
print $form->selectMultiCurrency($currency_code, 'multicurrency_code');
|
||||
print '</td></tr>';
|
||||
@@ -3899,7 +3899,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print fieldLabel('Currency','multicurrency_code');
|
||||
print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0);
|
||||
print '</td>';
|
||||
if ($action != 'editmulticurrencycode' && ! empty($object->brouillon))
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencycode&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||
@@ -3915,7 +3915,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print fieldLabel('CurrencyRate','multicurrency_tx');
|
||||
print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0);
|
||||
print '</td>';
|
||||
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency)
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||
@@ -4001,17 +4001,17 @@ else if ($id > 0 || ! empty($ref))
|
||||
if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code != $conf->currency))
|
||||
{
|
||||
// Multicurrency Amount HT
|
||||
print '<tr><td class="titlefieldmiddle">' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . '</td>';
|
||||
print '<tr><td class="titlefieldmiddle">' . $form->editfieldkey('MulticurrencyAmountHT', 'multicurrency_total_ht', '', $object, 0) . '</td>';
|
||||
print '<td class="nowrap amountcard">' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Multicurrency Amount VAT
|
||||
print '<tr><td>' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . '</td>';
|
||||
print '<tr><td>' . $form->editfieldkey('MulticurrencyAmountVAT', 'multicurrency_total_tva', '', $object, 0) . '</td>';
|
||||
print '<td class="nowrap amountcard">' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Multicurrency Amount TTC
|
||||
print '<tr><td>' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . '</td>';
|
||||
print '<tr><td>' . $form->editfieldkey('MulticurrencyAmountTTC', 'multicurrency_total_ttc', '', $object, 0) . '</td>';
|
||||
print '<td class="nowrap amountcard">' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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 '<tr><td class="titlefieldmiddle">' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . '</td>';
|
||||
print '<tr><td class="titlefieldmiddle">' . $form->editfieldkey('MulticurrencyAmountHT', 'multicurrency_total_ht', '', $object, 0) . '</td>';
|
||||
print '<td class="nowrap">' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Multicurrency Amount VAT
|
||||
print '<tr><td>' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . '</td>';
|
||||
print '<tr><td>' . $form->editfieldkey('MulticurrencyAmountVAT', 'multicurrency_total_tva', '', $object, 0) . '</td>';
|
||||
print '<td class="nowrap">' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Multicurrency Amount TTC
|
||||
print '<tr><td>' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . '</td>';
|
||||
print '<tr><td>' . $form->editfieldkey('MulticurrencyAmountTTC', 'multicurrency_total_ttc', '', $object, 0) . '</td>';
|
||||
print '<td class="nowrap">' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2011-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Charlie BENKE <charlie@patas-monkey.com>
|
||||
/* Copyright (C) 2011-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Charlie BENKE <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -255,44 +255,44 @@ if ($action == 'create')
|
||||
|
||||
// Date payment
|
||||
print '<tr><td>';
|
||||
print fieldLabel('DatePayment','datep',1).'</td><td>';
|
||||
print $form->editfieldkey('DatePayment', 'datep', '', $object, 0, 'string', '', 1).'</td><td>';
|
||||
print $form->selectDate((empty($datep)?-1:$datep), "datep", '', '', '', 'add', 1, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Date value for bank
|
||||
print '<tr><td>';
|
||||
print fieldLabel('DateValue','datev',0).'</td><td>';
|
||||
print $form->editfieldkey('DateValue', 'datev', '', $object, 0).'</td><td>';
|
||||
print $form->selectDate((empty($datev)?-1:$datev), "datev", '', '', '', 'add', 1, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Employee
|
||||
print '<tr><td>';
|
||||
print fieldLabel('Employee','fk_user',1).'</td><td>';
|
||||
print $form->editfieldkey('Employee', 'fk_user', '', $object, 0, 'string', '', 1).'</td><td>';
|
||||
$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 '</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td>';
|
||||
print fieldLabel('Label','label',1).'</td><td>';
|
||||
print $form->editfieldkey('Label', 'label', '', $object, 0, 'string', '', 1).'</td><td>';
|
||||
print '<input name="label" id="label" class="minwidth300" value="'.(GETPOST("label")?GETPOST("label"):$langs->trans("SalaryPayment")).'">';
|
||||
print '</td></tr>';
|
||||
|
||||
// Date start period
|
||||
print '<tr><td>';
|
||||
print fieldLabel('DateStartPeriod','datesp',1).'</td><td>';
|
||||
print $form->editfieldkey('DateStartPeriod', 'datesp', '', $object, 0, 'string', '', 1).'</td><td>';
|
||||
print $form->selectDate($datesp, "datesp", '', '', '', 'add');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end period
|
||||
print '<tr><td>';
|
||||
print fieldLabel('DateEndPeriod','dateep',1).'</td><td>';
|
||||
print $form->editfieldkey('DateEndPeriod', 'dateep', '', $object, 0, 'string', '', 1).'</td><td>';
|
||||
print $form->selectDate($dateep, "dateep", '', '', '', 'add');
|
||||
print '</td></tr>';
|
||||
|
||||
// Amount
|
||||
print '<tr><td>';
|
||||
print fieldLabel('Amount','amount',1).'</td><td>';
|
||||
print $form->editfieldkey('Amount', 'amount', '', $object, 0, 'string', '', 1).'</td><td>';
|
||||
print '<input name="amount" id="amount" class="minwidth100" value="'.GETPOST("amount").'">';
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -312,14 +312,14 @@ if ($action == 'create')
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<tr><td>';
|
||||
print fieldLabel('BankAccount','selectaccountid',1).'</td><td>';
|
||||
print $form->editfieldkey('BankAccount', 'selectaccountid', '', $object, 0, 'string', '', 1).'</td><td>';
|
||||
$form->select_comptes($_POST["accountid"],"accountid",0,'',1); // Affiche liste des comptes courant
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Type payment
|
||||
print '<tr><td>';
|
||||
print fieldLabel('PaymentMode','selectpaymenttype',1).'</td><td>';
|
||||
print $form->editfieldkey('PaymentMode', 'selectpaymenttype', '', $object, 0, 'string', '', 1).'</td><td>';
|
||||
$form->select_types_paiements(GETPOST("paymenttype"), "paymenttype", '', 2);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@@ -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 '<tr><td><label for="skype">'.fieldLabel('Skype','skype').'</label></td>';
|
||||
print '<tr><td><label for="skype">'.$form->editfieldkey('Skype', 'skype', '', $object, 0).'</label></td>';
|
||||
print '<td colspan="3"><input type="text" name="skype" id="skype" class="minwidth100" maxlength="80" value="'.dol_escape_htmltag(GETPOSTISSET("skype")?GETPOST("skype",'alpha'):$object->skype).'"></td></tr>';
|
||||
}
|
||||
// Twitter
|
||||
if (! empty($conf->global->SOCIALNETWORKS_TWITTER))
|
||||
{
|
||||
print '<tr><td><label for="twitter">'.fieldLabel('Twitter','twitter').'</label></td>';
|
||||
print '<tr><td><label for="twitter">'.$form->editfieldkey('Twitter', 'twitter', '', $object, 0).'</label></td>';
|
||||
print '<td colspan="3"><input type="text" name="twitter" id="twitter" class="minwidth100" maxlength="80" value="'.dol_escape_htmltag(GETPOSTISSET("twitter")?GETPOST("twitter",'alpha'):$object->twitter).'"></td></tr>';
|
||||
}
|
||||
// Facebook
|
||||
if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK))
|
||||
{
|
||||
print '<tr><td><label for="facebook">'.fieldLabel('Facebook','facebook').'</label></td>';
|
||||
print '<tr><td><label for="facebook">'.$form->editfieldkey('Facebook', 'facebook', '', $object, 0).'</label></td>';
|
||||
print '<td colspan="3"><input type="text" name="facebook" id="facebook" class="minwidth100" maxlength="80" value="'.dol_escape_htmltag(GETPOSTISSET("facebook")?GETPOST("facebook",'alpha'):$object->facebook).'"></td></tr>';
|
||||
}
|
||||
}
|
||||
@@ -694,10 +694,9 @@ else
|
||||
|
||||
// Categories
|
||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) {
|
||||
print '<tr><td>' . fieldLabel( 'Categories', 'contcats' ) . '</td><td colspan="3">';
|
||||
$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 '<tr><td>' . $form->editfieldkey('Categories', 'contcats', '', $object, 0) . '</td><td colspan="3">';
|
||||
$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 "</td></tr>";
|
||||
}
|
||||
|
||||
@@ -938,19 +937,19 @@ else
|
||||
// Skype
|
||||
if (! empty($conf->global->SOCIALNETWORKS_SKYPE))
|
||||
{
|
||||
print '<tr><td><label for="skype">'.fieldLabel('Skype','skype').'</label></td>';
|
||||
print '<tr><td><label for="skype">'.$form->editfieldkey('Skype', 'skype', '', $object, 0).'</label></td>';
|
||||
print '<td><input type="text" name="skype" id="skype" class="minwidth100" maxlength="80" value="'.dol_escape_htmltag(GETPOSTISSET("skype")?GETPOST("skype",'alpha'):$object->skype).'"></td></tr>';
|
||||
}
|
||||
// Twitter
|
||||
if (! empty($conf->global->SOCIALNETWORKS_TWITTER))
|
||||
{
|
||||
print '<tr><td><label for="twitter">'.fieldLabel('Twitter','twitter').'</label></td>';
|
||||
print '<tr><td><label for="twitter">'.$form->editfieldkey('Twitter', 'twitter', '', $object, 0).'</label></td>';
|
||||
print '<td><input type="text" name="twitter" id="twitter" class="minwidth100" maxlength="80" value="'.dol_escape_htmltag(GETPOSTISSET("twitter")?GETPOST("twitter",'alpha'):$object->twitter).'"></td></tr>';
|
||||
}
|
||||
// Facebook
|
||||
if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK))
|
||||
{
|
||||
print '<tr><td><label for="facebook">'.fieldLabel('Facebook','facebook').'</label></td>';
|
||||
print '<tr><td><label for="facebook">'.$form->editfieldkey('Facebook', 'facebook', '', $object, 0).'</label></td>';
|
||||
print '<td><input type="text" name="facebook" id="facebook" class="minwidth100" maxlength="80" value="'.dol_escape_htmltag(GETPOST("facebook")?GETPOST("facebook",'alpha'):$object->facebook).'"></td></tr>';
|
||||
}
|
||||
}
|
||||
@@ -980,16 +979,16 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Categories
|
||||
if (!empty( $conf->categorie->enabled ) && !empty( $user->rights->categorie->lire )) {
|
||||
print '<tr><td>' . fieldLabel( 'Categories', 'contcats' ) . '</td>';
|
||||
if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
|
||||
print '<tr><td>' . $form->editfieldkey('Categories', 'contcats', '', $object, 0) . '</td>';
|
||||
print '<td colspan="3">';
|
||||
$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 "</td></tr>";
|
||||
}
|
||||
|
||||
@@ -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").'<br>';
|
||||
if (! empty($conf->societe->enabled))
|
||||
@@ -1176,7 +1175,7 @@ else
|
||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) {
|
||||
print '<tr><td class="titlefield">' . $langs->trans("Categories") . '</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showCategories( $object->id, 'contact', 1 );
|
||||
print $form->showCategories($object->id, 'contact', 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@@ -91,9 +91,6 @@ $head = datapolicyAdminPrepareHead();
|
||||
dol_fiche_head($head, 'settings', '', -1, "datapolicy@datapolicy");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
print "<script type='text/javascript'>
|
||||
$(document).ready(function(){
|
||||
$('#default_lang').change(function(){
|
||||
@@ -108,7 +105,7 @@ print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'
|
||||
print '<input type="hidden" name="action" value="setvalue">';
|
||||
print '<table>';
|
||||
if ($conf->global->MAIN_MULTILANGS) {
|
||||
print '<tr><td>' . fieldLabel('DefaultLang', 'default_lang') . '</td><td colspan="3" class="maxwidthonsmartphone">' . "\n";
|
||||
print '<tr><td>' . $form->editfieldkey('DefaultLang', 'default_lang', '', null, 0) . '</td><td colspan="3" class="maxwidthonsmartphone">' . "\n";
|
||||
print $formadmin->select_language((GETPOST('l') ? GETPOST('l') : $langs->defaultlang), 'default_lang', 0, 0, 1, 0, 0, 'maxwidth200onsmartphone');
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@@ -185,11 +185,14 @@ if ($action == 'create')
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Name
|
||||
print '<tr><td>'. fieldLabel('Name','name',1).'</td><td><input name="name" id="name" size="32" value="' . GETPOST("name", "alpha") . '"></td></tr>';
|
||||
print '<tr>';
|
||||
print '<td>'. $form->editfieldkey('Name', 'name', '', $object, 0, 'string', '', 1).'</td>';
|
||||
print '<td><input name="name" id="name" size="32" value="' . GETPOST("name", "alpha") . '"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Address
|
||||
print '<tr>';
|
||||
print '<td>'.fieldLabel('Address','address',0).'</td>';
|
||||
print '<td>'.$form->editfieldkey('Address', 'address', '', $object, 0).'</td>';
|
||||
print '<td>';
|
||||
print '<input name="address" id="address" class="qutrevingtpercent" value="' . GETPOST('address','alpha') . '">';
|
||||
print '</td>';
|
||||
@@ -197,18 +200,23 @@ if ($action == 'create')
|
||||
|
||||
// Zipcode
|
||||
print '<tr>';
|
||||
print '<td>'.fieldLabel('Zip','zipcode',0).'</td>';
|
||||
print '<td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td>';
|
||||
print '<td>';
|
||||
print $formcompany->select_ziptown(GETPOST('zipcode', 'alpha'), 'zipcode', array (
|
||||
print $formcompany->select_ziptown(
|
||||
GETPOST('zipcode', 'alpha'),
|
||||
'zipcode',
|
||||
array (
|
||||
'town',
|
||||
'selectcountry_id'
|
||||
), 6);
|
||||
),
|
||||
6
|
||||
);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Town
|
||||
print '<tr>';
|
||||
print '<td>'.fieldLabel('Town','town',0).'</td>';
|
||||
print '<td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td>';
|
||||
print '<td>';
|
||||
print $formcompany->select_ziptown(GETPOST('town', 'alpha'), 'town', array (
|
||||
'zipcode',
|
||||
@@ -219,7 +227,7 @@ if ($action == 'create')
|
||||
|
||||
// Country
|
||||
print '<tr>';
|
||||
print '<td>'.fieldLabel('Country','selectcountry_id',0).'</td>';
|
||||
print '<td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).'</td>';
|
||||
print '<td class="maxwidthonsmartphone">';
|
||||
print $form->select_country(GETPOST('country_id','int')>0?GETPOST('country_id','int'):$mysoc->country_id,'country_id');
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
@@ -228,7 +236,7 @@ if ($action == 'create')
|
||||
|
||||
// Status
|
||||
print '<tr>';
|
||||
print '<td>'.fieldLabel('Status','status',1).'</td>';
|
||||
print '<td>'.$form->editfieldkey('Status', 'status', '', $object, 0, 'string', '', 1).'</td>';
|
||||
print '<td>';
|
||||
print $form->selectarray('status',$status2label,GETPOST('status','alpha'));
|
||||
print '</td></tr>';
|
||||
@@ -272,30 +280,30 @@ if (($id || $ref) && $action == 'edit')
|
||||
print '</td></tr>';
|
||||
|
||||
// Name
|
||||
print '<tr><td>'.fieldLabel('Name','name',1).'</td><td>';
|
||||
print '<tr><td>'.$form->editfieldkey('Name', 'name', '', $object, 0, 'string', '', 1).'</td><td>';
|
||||
print '<input name="name" id="name" class="flat" size="32" value="'.$object->name.'">';
|
||||
print '</td></tr>';
|
||||
|
||||
// Address
|
||||
print '<tr><td>'.fieldLabel('Address','address',0).'</td>';
|
||||
print '<tr><td>'.$form->editfieldkey('Address', 'address', '', $object, 0).'</td>';
|
||||
print '<td>';
|
||||
print '<input name="address" id="address" size="32" value="' . $object->address . '">';
|
||||
print '</td></tr>';
|
||||
|
||||
// Zipcode / Town
|
||||
print '<tr><td>'.fieldLabel('Zip','zipcode',0).'</td><td>';
|
||||
print '<tr><td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td><td>';
|
||||
print $formcompany->select_ziptown($object->zip, 'zipcode', array (
|
||||
'town',
|
||||
'selectcountry_id'
|
||||
), 6) . '</tr>';
|
||||
print '<tr><td>'.fieldLabel('Town','town',0).'</td><td>';
|
||||
print '<tr><td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td>';
|
||||
print $formcompany->select_ziptown($object->town, 'town', array (
|
||||
'zipcode',
|
||||
'selectcountry_id'
|
||||
)) . '</td></tr>';
|
||||
|
||||
// Country
|
||||
print '<tr><td>'.fieldLabel('Country','selectcountry_id',0).'</td>';
|
||||
print '<tr><td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).'</td>';
|
||||
print '<td class="maxwidthonsmartphone">';
|
||||
print $form->select_country($object->fk_country,'country_id');
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
@@ -303,7 +311,7 @@ if (($id || $ref) && $action == 'edit')
|
||||
print '</tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.fieldLabel('Status','status',1).'</td><td>';
|
||||
print '<tr><td>'.$form->editfieldkey('Status', 'status', '', $object, 0, 'string', '', 1).'</td><td>';
|
||||
print $form->selectarray('status',$status2label,$object->status);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@@ -1169,10 +1169,9 @@ if ($action == 'create')
|
||||
}
|
||||
|
||||
// Multicurrency
|
||||
if (! empty($conf->multicurrency->enabled))
|
||||
{
|
||||
if (! empty($conf->multicurrency->enabled)) {
|
||||
print '<tr>';
|
||||
print '<td>'.fieldLabel('Currency','multicurrency_code').'</td>';
|
||||
print '<td>'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>';
|
||||
print '<td colspan="3" class="maxwidthonsmartphone">';
|
||||
print $form->selectMultiCurrency($currency_code, 'multicurrency_code');
|
||||
print '</td></tr>';
|
||||
@@ -1524,7 +1523,7 @@ if ($action == 'create')
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print fieldLabel('Currency','multicurrency_code');
|
||||
print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0);
|
||||
print '</td>';
|
||||
if ($action != 'editmulticurrencycode' && ! empty($object->brouillon))
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencycode&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||
@@ -1541,7 +1540,7 @@ if ($action == 'create')
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print fieldLabel('CurrencyRate','multicurrency_tx');
|
||||
print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0);
|
||||
print '</td>';
|
||||
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency)
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||
@@ -1612,17 +1611,17 @@ if ($action == 'create')
|
||||
if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code != $conf->currency))
|
||||
{
|
||||
// Multicurrency Amount HT
|
||||
print '<tr><td height="10" class="titlefieldmiddle">' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . '</td>';
|
||||
print '<tr><td class="titlefieldmiddle">' . $form->editfieldkey('MulticurrencyAmountHT', 'multicurrency_total_ht', '', $object, 0) . '</td>';
|
||||
print '<td>' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Multicurrency Amount VAT
|
||||
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . '</td>';
|
||||
print '<tr><td>' . $form->editfieldkey('MulticurrencyAmountVAT', 'multicurrency_total_tva', '', $object, 0) . '</td>';
|
||||
print '<td>' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Multicurrency Amount TTC
|
||||
print '<tr><td height="10">' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . '</td>';
|
||||
print '<tr><td>' . $form->editfieldkey('MulticurrencyAmountTTC', 'multicurrency_total_ttc', '', $object, 0) . '</td>';
|
||||
print '<td>' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@@ -933,23 +933,23 @@ if ($action == 'create' || $action == 'adduserldap')
|
||||
|
||||
|
||||
// Address
|
||||
print '<tr><td class="tdtop titlefieldcreate">'.fieldLabel('Address','address').'</td>';
|
||||
print '<tr><td class="tdtop titlefieldcreate">'.$form->editfieldkey('Address', 'address', '', $object, 0).'</td>';
|
||||
print '<td><textarea name="address" id="address" class="quatrevingtpercent" rows="3" wrap="soft">';
|
||||
print $object->address;
|
||||
print '</textarea></td></tr>';
|
||||
|
||||
// Zip
|
||||
print '<tr><td>'.fieldLabel('Zip','zipcode').'</td><td>';
|
||||
print '<tr><td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td><td>';
|
||||
print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','state_id'),6);
|
||||
print '</td></tr>';
|
||||
|
||||
// Town
|
||||
print '<tr><td>'.fieldLabel('Town','town').'</td><td>';
|
||||
print '<tr><td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td>';
|
||||
print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','state_id'));
|
||||
print '</td></tr>';
|
||||
|
||||
// Country
|
||||
print '<tr><td>'.fieldLabel('Country','selectcountry_id').'</td><td class="maxwidthonsmartphone">';
|
||||
print '<tr><td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">';
|
||||
print $form->select_country((GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id));
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
print '</td></tr>';
|
||||
@@ -957,7 +957,7 @@ if ($action == 'create' || $action == 'adduserldap')
|
||||
// State
|
||||
if (empty($conf->global->USER_DISABLE_STATE))
|
||||
{
|
||||
print '<tr><td>'.fieldLabel('State','state_id').'</td><td class="maxwidthonsmartphone">';
|
||||
print '<tr><td>'.$form->editfieldkey('State', 'state_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">';
|
||||
print $formcompany->select_state($object->state_id,$object->country_code, 'state_id');
|
||||
print '</td></tr>';
|
||||
}
|
||||
@@ -1090,7 +1090,7 @@ if ($action == 'create' || $action == 'adduserldap')
|
||||
// Categories
|
||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||
{
|
||||
print '<tr><td>' . fieldLabel('Categories', 'usercats') . '</td><td colspan="3">';
|
||||
print '<tr><td>' . $form->editfieldkey('Categories', 'usercats', '', $object, 0) . '</td><td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories('user', null, 'parent', null, null, 1);
|
||||
print $form->multiselectarray('usercats', $cate_arbo, GETPOST('usercats', 'array'), null, null, null,
|
||||
null, '90%' );
|
||||
@@ -2136,7 +2136,7 @@ else
|
||||
|
||||
// Employee
|
||||
print '<tr>';
|
||||
print '<td>'.fieldLabel('Employee','employee',0).'</td><td>';
|
||||
print '<td>'.$form->editfieldkey('Employee', 'employee', '', $object, 0).'</td><td>';
|
||||
print $form->selectyesno("employee",$object->employee,1);
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -2162,23 +2162,23 @@ else
|
||||
|
||||
|
||||
// Address
|
||||
print '<tr><td class="tdtop titlefield">'.fieldLabel('Address','address').'</td>';
|
||||
print '<tr><td class="tdtop titlefield">'.$form->editfieldkey('Address', 'address', '', $object, 0).'</td>';
|
||||
print '<td><textarea name="address" id="address" class="quatrevingtpercent" rows="3" wrap="soft">';
|
||||
print $object->address;
|
||||
print '</textarea></td></tr>';
|
||||
|
||||
// Zip
|
||||
print '<tr><td>'.fieldLabel('Zip','zipcode').'</td><td>';
|
||||
print '<tr><td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td><td>';
|
||||
print $formcompany->select_ziptown($object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
|
||||
print '</td></tr>';
|
||||
|
||||
// Town
|
||||
print '<tr><td>'.fieldLabel('Town','town').'</td><td>';
|
||||
print '<tr><td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td>';
|
||||
print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id'));
|
||||
print '</td></tr>';
|
||||
|
||||
// Country
|
||||
print '<tr><td>'.fieldLabel('Country','selectcounty_id').'</td><td>';
|
||||
print '<tr><td>'.$form->editfieldkey('Country', 'selectcounty_id', '', $object, 0).'</td><td>';
|
||||
print $form->select_country((GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id),'country_id');
|
||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||
print '</td></tr>';
|
||||
@@ -2186,7 +2186,7 @@ else
|
||||
// State
|
||||
if (empty($conf->global->USER_DISABLE_STATE))
|
||||
{
|
||||
print '<tr><td class="tdoverflow">'.fieldLabel('State','state_id').'</td><td>';
|
||||
print '<tr><td class="tdoverflow">'.$form->editfieldkey('State', 'state_id', '', $object, 0).'</td><td>';
|
||||
print $formcompany->select_state($object->state_id,$object->country_code, 'state_id');
|
||||
print '</td></tr>';
|
||||
}
|
||||
@@ -2356,7 +2356,7 @@ else
|
||||
// Categories
|
||||
if (!empty( $conf->categorie->enabled ) && !empty( $user->rights->categorie->lire ))
|
||||
{
|
||||
print '<tr><td>' . fieldLabel( 'Categories', 'usercats' ) . '</td>';
|
||||
print '<tr><td>' . $form->editfieldkey('Categories', 'usercats', '', $object, 0) . '</td>';
|
||||
print '<td>';
|
||||
$cate_arbo = $form->select_all_categories( Categorie::TYPE_USER, null, null, null, null, 1 );
|
||||
$c = new Categorie( $db );
|
||||
|
||||
Reference in New Issue
Block a user