Fix phpcs
This commit is contained in:
parent
700e384639
commit
6f3cbe69e8
@ -325,13 +325,14 @@ class Form
|
||||
* @param string $typeofdata Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols', 'datepicker' ('day' do not work, don't know why), 'ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...)
|
||||
* @return string HTML code for the edit of alternative language
|
||||
*/
|
||||
public function widgetForTranslation($htmlname, $object, $perm, $typeofdata = 'string') {
|
||||
public function widgetForTranslation($fieldname, $object, $perm, $typeofdata = 'string')
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$result = '';
|
||||
|
||||
if (! empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE)) {
|
||||
$result ='<div class="inline-block field-'.$object->element.'-'.$htmlname.'">';
|
||||
$result ='<div class="inline-block paddingleft field-'.$object->element.'-'.$fieldname.'">';
|
||||
|
||||
$s=picto_from_langcode($conf->global->PDF_USE_ALSO_LANGUAGE_CODE);
|
||||
$result .= $s;
|
||||
|
||||
@ -522,20 +522,3 @@ function showWebsiteTemplates(Website $website)
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Return HTML content to add structured data for an article, news or Blog Post.
|
||||
*
|
||||
* @return string HTML content
|
||||
*/
|
||||
function getRSSForBlogPosts()
|
||||
{
|
||||
global $conf, $db, $hookmanager, $langs, $mysoc, $user, $website, $websitepage, $weblangs; // Very important. Required to have var available when running inluded containers.
|
||||
|
||||
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1258,7 +1258,7 @@ else
|
||||
{
|
||||
// Supplier
|
||||
print '<tr>';
|
||||
print '<td>'.$form->editfieldkey('Vendor', 'fournisseur', '', $object, $permissiontoadd, 'string', '', 1).'</td><td>';
|
||||
print '<td>'.$form->editfieldkey('Vendor', 'fournisseur', '', $object, 0, 'string', '', 1).'</td><td>';
|
||||
$default = -1;
|
||||
if (!empty($conf->global->THIRDPARTY_SUPPLIER_BY_DEFAULT)) $default = 1;
|
||||
print $form->selectyesno("fournisseur", (GETPOST('fournisseur', 'int') != '' ?GETPOST('fournisseur', 'int') : (GETPOST("type", 'alpha') == '' ? $default : $object->fournisseur)), 1, 0, (GETPOST("type", 'alpha') == '' ? 1 : 0));
|
||||
@ -1270,7 +1270,7 @@ else
|
||||
print '<td>';
|
||||
if (!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire))
|
||||
{
|
||||
print $form->editfieldkey('SupplierCode', 'supplier_code', '', $object, $permissiontoadd);
|
||||
print $form->editfieldkey('SupplierCode', 'supplier_code', '', $object, 0);
|
||||
}
|
||||
print '</td><td>';
|
||||
if (!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire))
|
||||
@ -1288,21 +1288,21 @@ else
|
||||
}
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$form->editfieldkey('Status', 'status', '', $object, $permissiontoadd).'</td><td colspan="3">';
|
||||
print '<tr><td>'.$form->editfieldkey('Status', 'status', '', $object, 0).'</td><td colspan="3">';
|
||||
print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Barcode
|
||||
if (!empty($conf->barcode->enabled))
|
||||
{
|
||||
print '<tr><td>'.$form->editfieldkey('Gencod', 'barcode', '', $object, $permissiontoadd).'</td>';
|
||||
print '<tr><td>'.$form->editfieldkey('Gencod', 'barcode', '', $object, 0).'</td>';
|
||||
print '<td colspan="3"><input type="text" name="barcode" id="barcode" value="'.$object->barcode.'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Address
|
||||
print '<tr><td class="tdtop">';
|
||||
print $form->editfieldkey('Address', 'address', '', $object, $permissiontoadd);
|
||||
print $form->editfieldkey('Address', 'address', '', $object, 0);
|
||||
print '</td>';
|
||||
print '<td colspan="3"><textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_2.'" wrap="soft">';
|
||||
print $object->address;
|
||||
@ -1311,17 +1311,17 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Zip / Town
|
||||
print '<tr><td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, $permissiontoadd).'</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'), 0, 0, '', 'maxwidth100 quatrevingtpercent');
|
||||
print '</td>';
|
||||
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
||||
print '<td>'.$form->editfieldkey('Town', 'town', '', $object, $permissiontoadd).'</td><td>';
|
||||
print '<td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td>';
|
||||
print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth100 quatrevingtpercent');
|
||||
print $form->widgetForTranslation("town", $object, $permissiontoadd);
|
||||
print '</td></tr>';
|
||||
|
||||
// Country
|
||||
print '<tr><td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, $permissiontoadd).'</td><td colspan="3" class="maxwidthonsmartphone">';
|
||||
print '<tr><td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).'</td><td colspan="3" 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>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user