* Copyright (C) 2012-2017 Regis Houssin * Copyright (C) 2018-2019 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 * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /* To call this template, you must define * $textobject * $langs * $extrafield * $elementtype */ // Protection to avoid direct call of template if (empty($langs) || !is_object($langs)) { print "Error, template page can't be called as URL"; exit; } $langs->load("modulebuilder"); ?> '.$langs->trans("DefineHereComplementaryAttributes", $textobject).'
'."\n"; print '
'; // Load attribute_label $extrafields->fetch_name_optionals_label($elementtype); print '
'; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; if ($conf->multicompany->enabled) { print ''; } print ''; print "\n"; if (is_array($extrafields->attributes[$elementtype]['type']) && count($extrafields->attributes[$elementtype]['type'])) { foreach ($extrafields->attributes[$elementtype]['type'] as $key => $value) { // Load language if required if (!empty($extrafields->attributes[$elementtype]['langfile'][$key])) { $langs->load($extrafields->attributes[$elementtype]['langfile'][$key]); } print ''; print "\n"; print "\n"; // We don't translate here, we want admin to know what is the key not translated value print "\n"; print "\n"; print "\n"; print '\n"; print '\n"; print '\n"; print '\n"; print '\n"; print '\n"; print '\n"; print '\n"; if (!empty($conf->multicompany->enabled)) { print ''; } print ''."\n"; print ""; } } else { $colspan = 13; if (!empty($conf->multicompany->enabled)) $colspan++; print ''; print ''; print ''; } print "
'.$langs->trans("Position"); print ''; print img_picto('A-Z', '1downarrow.png'); print ''; print ''.$langs->trans("LabelOrTranslationKey").''.$langs->trans("TranslationString").''.$langs->trans("AttributeCode").''.$langs->trans("Type").''.$langs->trans("Size").''.$langs->trans("ComputedFormula").''.$langs->trans("Unique").''.$langs->trans("Required").''.$langs->trans("AlwaysEditable").''.$form->textwithpicto($langs->trans("Visible"), $langs->trans("VisibleDesc")).''.$form->textwithpicto($langs->trans("DisplayOnPdf"), $langs->trans("DisplayOnPdfDesc")).''.$form->textwithpicto($langs->trans("Totalizable"), $langs->trans("TotalizableDesc")).''.$langs->trans("Entities").' 
".$extrafields->attributes[$elementtype]['pos'][$key]."".$extrafields->attributes[$elementtype]['label'][$key]."".$langs->trans($extrafields->attributes[$elementtype]['label'][$key])."".$key."".$type2label[$extrafields->attributes[$elementtype]['type'][$key]]."'.$extrafields->attributes[$elementtype]['size'][$key]."'.dol_trunc($extrafields->attributes[$elementtype]['computed'][$key], 20)."'.yn($extrafields->attributes[$elementtype]['unique'][$key])."'.yn($extrafields->attributes[$elementtype]['required'][$key])."'.yn($extrafields->attributes[$elementtype]['alwayseditable'][$key])."'.$extrafields->attributes[$elementtype]['list'][$key]."'.$extrafields->attributes[$elementtype]['printable'][$key]."'.yn($extrafields->attributes[$elementtype]['totalizable'][$key])."'; if (empty($extrafields->attributes[$elementtype]['entityid'][$key])) { print $langs->trans("All"); } else { global $multicompanylabel_cache; if (!is_array($multicompanylabel_cache)) $multicompanylabel_cache = array(); if (empty($multicompanylabel_cache[$extrafields->attributes[$elementtype]['entityid'][$key]])) { global $mc; $mc->getInfo($extrafields->attributes[$elementtype]['entityid'][$key]); $multicompanylabel_cache[$extrafields->attributes[$elementtype]['entityid'][$key]] = $mc->label ? $mc->label : $extrafields->attributes[$elementtype]['entityid'][$key]; } print $multicompanylabel_cache[$extrafields->attributes[$elementtype]['entityid'][$key]]; } print ''.img_edit().''; print '  '.img_delete().'
'; print $langs->trans("None"); print '
"; print '
'; ?>