43 * @phan-var-force string $action
44 * @phan-var-force ?string $elementtype
45 * @phan-var-force string $textobject
46 * @phan-var-force ?string $pagekey
50 print
"Error, template page can't be called as URL";
56$pagekeyforurl = isset($pagekey) ? $pagekey : $elementtype;
58$langs->load(
"modulebuilder");
60$listofexamplesforlink =
'Societe:societe/class/societe.class.php<br>Contact:contact/class/contact.class.php<br>Product:product/class/product.class.php<br>Project:projet/class/project.class.php';
64<!-- BEGIN PHP TEMPLATE admin_extrafields_add.tpl.php -->
66 jQuery(document).ready(
function() {
67 function init_typeoffields(
type)
69 console.log(
"admin_extrafields_add select a new type (add) = "+
type);
70 var size = jQuery(
"#size");
71 var computed_value = jQuery(
"#computed_value");
72 var ai_prompt = jQuery(
"#ai_prompt");
73 var langfile = jQuery(
"#langfile");
74 var default_value = jQuery(
"#default_value");
75 var unique = jQuery(
"#unique");
76 var required = jQuery(
"#required");
77 var alwayseditable = jQuery(
"#alwayseditable");
78 var emptyonclone = jQuery(
"#emptyonclone");
79 var list = jQuery(
"#list");
80 var totalizable = jQuery(
"#totalizable");
82 if ((
GETPOST(
'type',
'alpha') !=
"select") && (
GETPOST(
'type',
'alpha') !=
"sellist")) {
83 print
'jQuery("#value_choice").hide();';
86 if (
GETPOST(
'type',
'alpha') ==
"separate") {
87 print
"jQuery('#size, #default_value, #langfile').val('').prop('disabled', true);";
88 print
'jQuery("#value_choice").hide();';
94 jQuery(
"tr.extra_computed_value").show();
96 computed_value.val(
''); jQuery(
"tr.extra_computed_value").hide();
98 if (computed_value.val())
100 console.log(
"We enter a computed formula");
101 jQuery(
"#default_value").val(
'');
103 jQuery(
"#default_value, #unique, #required, #alwayseditable, #emptyonclone, #list").attr(
'disabled',
true);
104 jQuery(
"tr.extra_default_value, tr.extra_unique, tr.extra_required, tr.extra_alwayseditable, tr.extra_emptyonclone, tr.extra_list").hide();
108 console.log(
"No computed formula");
109 jQuery(
"#default_value, #unique, #required, #alwayseditable, #emptyonclone, #list").attr(
'disabled',
false);
110 jQuery(
"tr.extra_default_value, tr.extra_unique, tr.extra_required, tr.extra_alwayseditable, tr.extra_emptyonclone, tr.extra_list").show();
114 if (
type ==
'text' ||
type ==
'varchar' ||
type ==
'int' ||
type ==
'double' ||
type ==
'price' ||
type ==
'html') {
115 jQuery(
"tr.extra_ai_prompt").show();
117 jQuery(ai_prompt).val(
''); jQuery(
"tr.extra_ai_prompt").hide();
120 if (
type ==
'date') { size.val(
'').prop(
'disabled',
true); unique.removeAttr(
'disabled'); jQuery(
"#value_choice").hide();jQuery(
"#helpchkbxlst").hide(); }
121 else if (
type ==
'datetime') { size.val(
'').prop(
'disabled',
true); unique.removeAttr(
'disabled'); jQuery(
"#value_choice").hide(); jQuery(
"#helpchkbxlst").hide();}
122 else if (
type ==
'double') { size.val(
'24,8').removeAttr(
'disabled'); unique.removeAttr(
'disabled'); jQuery(
"#value_choice").hide(); jQuery(
"#helpchkbxlst").hide();}
123 else if (
type ==
'int') { size.val(
'10').removeAttr(
'disabled'); unique.removeAttr(
'disabled'); jQuery(
"#value_choice").hide(); jQuery(
"#helpchkbxlst").hide();}
124 else if (
type ==
'text') { size.val(
'2000').removeAttr(
'disabled'); unique.prop(
'disabled',
true).removeAttr(
'checked'); jQuery(
"#value_choice").hide();jQuery(
"#helpchkbxlst").hide(); }
125 else if (
type ==
'html') { size.val(
'2000').removeAttr(
'disabled'); unique.prop(
'disabled',
true).removeAttr(
'checked'); jQuery(
"#value_choice").hide();jQuery(
"#helpchkbxlst").hide(); }
126 else if (
type ==
'varchar') { size.val(
'255').removeAttr(
'disabled'); unique.removeAttr(
'disabled'); jQuery(
"#value_choice").hide();jQuery(
"#helpchkbxlst").hide(); }
127 else if (
type ==
'password') { size.val(
'').prop(
'disabled',
true); unique.removeAttr(
'checked').prop(
'disabled',
true); required.val(
'').prop(
'disabled',
true); default_value.val(
'').prop(
'disabled',
true); jQuery(
"#value_choice").show(); jQuery(
".spanforparamtooltip").hide(); jQuery(
"#helppassword").show();}
128 else if (
type ==
'boolean') { size.val(
'').prop(
'disabled',
true); unique.removeAttr(
'checked').prop(
'disabled',
true); jQuery(
"#value_choice").hide();jQuery(
"#helpchkbxlst").hide();}
129 else if (
type ==
'price') { size.val(
'').prop(
'disabled',
true); unique.removeAttr(
'checked').prop(
'disabled',
true); jQuery(
"#value_choice").hide();jQuery(
"#helpchkbxlst").hide();}
130 else if (
type ==
'pricecy') { size.val(
'').prop(
'disabled',
true); unique.removeAttr(
'checked').prop(
'disabled',
true); jQuery(
"#value_choice").hide();jQuery(
"#helpchkbxlst").hide();}
131 else if (
type ==
'select') { size.val(
'').prop(
'disabled',
true); unique.removeAttr(
'checked').prop(
'disabled',
true); jQuery(
"#value_choice").show(); jQuery(
".spanforparamtooltip").hide(); jQuery(
"#helpselect").show();}
132 else if (
type ==
'sellist') { size.val(
'').prop(
'disabled',
true); unique.removeAttr(
'checked').prop(
'disabled',
true); jQuery(
"#value_choice").show(); jQuery(
".spanforparamtooltip").hide(); jQuery(
"#helpsellist").show();}
133 else if (
type ==
'radio') { size.val(
'').prop(
'disabled',
true); unique.removeAttr(
'checked').prop(
'disabled',
true); jQuery(
"#value_choice").show(); jQuery(
".spanforparamtooltip").hide(); jQuery(
"#helpselect").show();}
134 else if (
type ==
'checkbox') { size.val(
'').prop(
'disabled',
true); unique.removeAttr(
'checked').prop(
'disabled',
true); jQuery(
"#value_choice").show(); jQuery(
".spanforparamtooltip").hide(); jQuery(
"#helpselect").show();}
135 else if (
type ==
'chkbxlst') { size.val(
'').prop(
'disabled',
true); unique.removeAttr(
'checked').prop(
'disabled',
true); jQuery(
"#value_choice").show(); jQuery(
".spanforparamtooltip").hide(); jQuery(
"#helpchkbxlst").show();}
136 else if (
type ==
'link') { size.val(
'').prop(
'disabled',
true); unique.removeAttr(
'disabled'); jQuery(
"#value_choice").show(); jQuery(
".spanforparamtooltip").hide(); jQuery(
"#helplink").show();}
137 else if (
type ==
'point') { size.val(
'').prop(
'disabled',
true); unique.removeAttr(
'disabled'); jQuery(
"#value_choice").show(); jQuery(
".spanforparamtooltip").hide(); jQuery(
"#helplink").show();}
138 else if (
type ==
'linestrg') { size.val(
'').prop(
'disabled',
true); unique.removeAttr(
'disabled'); jQuery(
"#value_choice").show(); jQuery(
".spanforparamtooltip").hide(); jQuery(
"#helplink").show();}
139 else if (
type ==
'polygon') { size.val(
'').prop(
'disabled',
true); unique.removeAttr(
'disabled'); jQuery(
"#value_choice").show(); jQuery(
".spanforparamtooltip").hide(); jQuery(
"#helplink").show();}
140 else if (
type ==
'stars') { size.val(
'5').removeAttr(
'disabled'); unique.removeAttr(
'disabled'); jQuery(
"#value_choice").hide(); jQuery(
"#helpchkbxlst").hide();}
141 else if (
type ==
'separate') {
142 langfile.val(
'').prop(
'disabled',
true);size.val(
'').prop(
'disabled',
true); unique.removeAttr(
'checked').prop(
'disabled',
true); required.val(
'').prop(
'disabled',
true);
143 jQuery(
"#value_choice").show();
144 jQuery(
".spanforparamtooltip").hide(); jQuery(
"#helpseparate").show();
147 size.val(
'').prop(
'disabled',
true);
148 unique.removeAttr(
'disabled');
151 if (
type ==
'separate' ||
type ==
'point' ||
type ==
'linestrg' ||
type ==
'polygon')
153 required.removeAttr(
'checked').prop(
'disabled',
true); alwayseditable.removeAttr(
'checked').prop(
'disabled',
true); emptyonclone.removeAttr(
'checked').prop(
'disabled',
true); list.removeAttr(
'checked').prop(
'disabled',
true);
154 jQuery(
'#size, #default_value, #langfile').val(
'').prop(
'disabled',
true);
155 jQuery(
'#list').val(3);
159 default_value.removeAttr(
'disabled');
160 langfile.removeAttr(
'disabled');required.removeAttr(
'disabled'); alwayseditable.removeAttr(
'disabled'); emptyonclone.removeAttr(
'disabled'); list.removeAttr(
'disabled');
164 jQuery(
"#type").change(
function() {
165 init_typeoffields($(
this).val());
169 jQuery(
"#computed_value").keyup(
function() {
170 init_typeoffields(jQuery(
'#type').val());
174 <?php
if (!
getDolGlobalInt(
'MAIN_EXTRAFIELDS_CODE_AUTOFILL_DISABLED')) { ?>
175 jQuery(
"#label").keyup(
function() {
176 console.log(
"Update new field");
177 $(
"#attrname").val( $(
this).val().normalize(
'NFD').replace(/\s/g,
"_").replace(/[^a-zA-Z0-9_]/g,
'').toLowerCase() );
183<form action=
"<?php echo $_SERVER["PHP_SELF
"]; ?>" method=
"post">
184<input
type=
"hidden" name=
"token" value=
"<?php echo newToken(); ?>">
185<input
type=
"hidden" name=
"action" value=
"add">
186<input
type=
"hidden" name=
"elementtype" value=
"<?php echo dol_escape_htmltag($pagekeyforurl); ?>">
190<
table summary=
"listofattributes" class=
"border centpercent">
192<tr><td
class=
"titlefieldcreate fieldrequired"><?php echo $langs->trans(
"LabelOrTranslationKey"); ?></td><td
class=
"valeur"><input
type=
"text" name=
"label" id=
"label" class=
"width200" value=
"<?php echo dol_escape_htmltag(GETPOST('label', 'alpha')); ?>" autofocus spellcheck=
"false"></td></tr>
194<tr><td
class=
"fieldrequired"><?php echo $form->textwithpicto($langs->trans(
"AttributeCode"), $langs->trans(
"AttributeCodeHelp")); ?></td><td
class=
"valeur"><input
type=
"text" name=
"attrname" id=
"attrname" size=
"10" value=
"<?php echo dol_escape_htmltag(GETPOST('attrname', 'alpha')); ?>" pattern=
"\w+"> <span
class=
"opacitymedium">(<?php echo $langs->trans(
"AlphaNumOnlyLowerCharsAndNoSpace"); ?>)</span></td></tr>
196<tr><td
class=
"fieldrequired"><?php echo $langs->trans(
"Type"); ?></td><td
class=
"valeur">
199if (empty($formadmin)) {
200 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
203print $formadmin->selectTypeOfFields(
'type',
GETPOST(
'type',
'alpha'));
207<tr
class=
"extra_size"><td><?php echo $langs->trans(
"Size"); ?></td><td
class=
"valeur"><input
id=
"size" type=
"text" name=
"size" class=
"width50" value=
"<?php echo dol_escape_htmltag(GETPOST('size', 'alpha') ? GETPOST('size', 'alpha') : ''); ?>"></td></tr>
208<!-- Default Value (
for select list / radio/ checkbox) -->
209<tr
id=
"value_choice">
211 <?php echo $langs->trans(
"Value"); ?>
214 <
table class=
"nobordernopadding">
216 <textarea
name=
"param" id=
"param" cols=
"80" rows=
"<?php echo ROWS_4 ?>" spellcheck=
"false""><?php echo GETPOST('param', 'alpha'); ?></textarea>
218 <span id="helpselect
" class="spanforparamtooltip
"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpselect
"), 1, 'info', '', 0, 2, 'helpvalue1')?></span>
219 <span id="helpsellist
" class="spanforparamtooltip
"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist
").'<br>'.$langs->trans("ExtrafieldParamHelpsellistb
").'<br>'.$langs->trans("ExtrafieldParamHelpsellistc
").'<br>'.$langs->trans("ExtrafieldParamHelpsellistd
").(getDolGlobalInt('MAIN_FEATUREES_LEVEL') > 0 ? '<br>'.$langs->trans("ExtrafieldParamHelpsellist2
") : ''), 1, 'info', '', 0, 2, 'helpvalue2')?></span>
220 <span id="helpchkbxlst
" class="spanforparamtooltip
"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist
").'<br>'.$langs->trans("ExtrafieldParamHelpsellistb
").'<br>'.$langs->trans("ExtrafieldParamHelpsellistc
").'<br>'.$langs->trans("ExtrafieldParamHelpsellistd
").(getDolGlobalInt('MAIN_FEATUREES_LEVEL') > 0 ? '<br>'.$langs->trans("ExtrafieldParamHelpsellist2
") : ''), 1, 'info', '', 0, 2, 'helpvalue3')?></span>
221 <span id="helplink
" class="spanforparamtooltip
"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelplink
").'<br><br>'.$langs->trans("Examples
").':<br>'.$listofexamplesforlink, 1, 'info', '', 0, 2, 'helpvalue4')?></span>
222 <span id="helppassword
" class="spanforparamtooltip
"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpPassword
"), 1, 'info', '', 0, 2, 'helpvalue5')?></span>
223 <span id="helpseparate
" class="spanforparamtooltip
"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpSeparator
"), 1, 'info', '', 0, 2, 'helpvalue6')?></span>
229<tr><td class="titlefield
"><?php echo $langs->trans("Position"); ?></td><td class="valeur
"><input type="text
" name="pos
" class="width50
" value="<?php echo
GETPOSTISSET(
'pos') ?
GETPOSTINT(
'pos') : 100; ?>
"></td></tr>
230<!-- Language file -->
231<tr><td class="titlefield
"><?php echo $langs->trans("LanguageFile
"); ?></td><td class="valeur
"><input type="text
" id="langfile
" name="langfile
" class="minwidth200
" value="<?php echo
dol_escape_htmltag(
GETPOST(
'langfile',
'alpha')); ?>
"></td></tr>
232<!-- Computed Value -->
233<tr class="extra_computed_value
">
235 global $dolibarr_main_restrict_eval_methods;
236if (!isset($dolibarr_main_restrict_eval_methods)) {
237 $showfunctions = 'getDolGlobalString, getDolGlobalInt, getDolCurrency, getDolEntity, getDolDBType, fetchNoCompute, hasRight, isAdmin, isExternalUser, isModEnabled, isStringVarMatching, abs, min, max, round, dol_now, preg_match';
239 $showfunctions = $dolibarr_main_restrict_eval_methods ? $dolibarr_main_restrict_eval_methods : $langs->transnoentitiesnoconv("None
");
242if (!getDolGlobalString('MAIN_STORE_COMPUTED_EXTRAFIELDS')) {
244 <td><?php echo $form->textwithpicto($langs->trans("ComputedFormula
"), $langs->trans("ComputedFormulaDesc
", '$objectoffield', $showfunctions).'<br>'.$langs->trans("ComputedFormulaDesc2
").'<br><br>'.$langs->trans("ComputedFormulaDesc3
"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?></td>
247 <td><?php echo $form->textwithpicto($langs->trans("ComputedFormula
"), $langs->trans("ComputedFormulaDesc
", '$objectoffield', $showfunctions).'<br>'.$langs->trans("ComputedFormulaDesc2
").'<br><br>'.$langs->trans("ComputedFormulaDesc3
")).$form->textwithpicto($langs->trans("Computedpersistent
"), $langs->trans("ComputedpersistentDesc
"), 1, 'warning'); ?></td>
249<td class="valeur
"><textarea name="computed_value
" id="computed_value
" class="quatrevingtpercent
" rows="<?php echo ROWS_4 ?>
"><?php echo(GETPOSTISSET('computed_value') ? GETPOST('computed_value', 'restricthtml') : ''); ?></textarea></td>
252<tr class="extra_ai_prompt
">
254 if ($pagekeyforurl == "projet
") {
255 $pagekeyforurl = "project
";
257 $elementprop = getElementProperties((string) $pagekeyforurl);
258 $object = fetchObjectByElement(0, (string) $pagekeyforurl);
259 if ($elementprop["module
"] == "adherent
") {
260 $elementprop["module
"] = "member
";
262 if ($elementprop["module
"] == "projet
") {
263 $elementprop["module
"] = "project
";
265 if ($elementprop["module
"] == "contrat
") {
266 $elementprop["module
"] = "contract
";
267 $object->element = "contract
";
269 if ($elementprop["module
"] == "ficheinter
") {
270 $elementprop["module
"] = "intervention
";
272 $substitutionarray = getCommonSubstitutionArray($langs, 1, null, $object, array("object", $elementprop["module
"]));
273 $texthelp = $langs->trans("AIPromptExtrafieldDesc
").'<br><br>';
274 $texthelp .= $langs->trans("FollowingConstantsWillBeSubstituted
").'<br><small>';
275 foreach ($substitutionarray as $key => $val) {
276 $texthelp .= $key.' -> '.$val.'<br>';
278 $texthelp .= '</small>';
279 echo $form->textwithpicto($langs->trans("AIPromptExtrafield
"), $texthelp, 1, 'help', 'valignmiddle', 0, 3, 'abc');?></td>
280<td class="valeur
"><textarea name="ai_prompt
" id="ai_prompt
" class="quatrevingtpercent
" rows="<?php echo ROWS_4 ?>
"><?php echo(GETPOSTISSET('ai_prompt') ? GETPOST('ai_prompt', 'restricthtml') : ''); ?></textarea></td></tr>
281<!-- Default Value (at sql setup level) -->
282<tr class="extra_default_value
"><td><?php echo $langs->trans("DefaultValue
").' <span class="opacitymedium small
">('.$langs->trans("Database").')</span>'; ?></td><td class="valeur
"><input id="default_value
" type="text
" name="default_value
" class="minwidth200
" value="<?php echo
dol_escape_htmltag(
GETPOST(
'default_value',
'alpha') ?
GETPOST(
'default_value',
'alpha') :
''); ?>
" spellcheck="false"></td></tr>
284<tr class="extra_unique
"><td><?php echo $langs->trans("Unique
").' <span class="opacitymedium small
">('.$langs->trans("Database").')</span>'; ?></td><td class="valeur
"><input id="unique
" type="checkbox
" name="unique
"<?php echo(GETPOST('unique', 'alpha') ? ' checked' : ''); ?>></td></tr>
286<tr class="extra_required
"><td><?php echo $langs->trans("Mandatory
").' <span class="opacitymedium small
">('.$langs->trans("Database").')</span>'; ?></td><td class="valeur
"><input id="required
" type="checkbox
" name="required
"<?php echo(GETPOST('required', 'alpha') ? ' checked' : ''); ?>></td></tr>
287<!-- Always editable -->
288<tr class="extra_alwayseditable
"><td><?php echo $form->textwithpicto($langs->trans("AlwaysEditable
"), $langs->trans("EditableWhenDraftOnly
")); ?></td><td class="valeur
"><input id="alwayseditable
" type="checkbox
" name="alwayseditable
"<?php echo((GETPOST('alwayseditable', 'alpha') || !GETPOST('button', 'alpha')) ? ' checked' : ''); ?>></td></tr>
289<!-- Empty on clone -->
290<tr class="extra_emptyonclone
"><td><?php echo $form->textwithpicto($langs->trans("EmptyOnClone
"), $langs->trans("EmptyOnCloneDesc
")); ?></td><td class="valeur
"><input id="emptyonclone
" type="checkbox
" name="emptyonclone
"<?php echo((GETPOST('emptyonclone', 'alpha')) ? ' checked' : ''); ?>></td></tr>
291<!-- Personal Data (RGPD) -->
292<tr class="extra_personal_data
"><td><?php echo $form->textwithpicto($langs->trans("IsPersonalData
"), $langs->trans("IsPersonalDataDesc
")); ?></td><td class="valeur
"><input id="personal_data
" type="checkbox
" name="personal_data
" value="1
"<?php echo(GETPOST('personal_data', 'alpha') ? ' checked' : ''); ?>></td></tr>
294<tr><td class="extra_list
"><?php echo $form->textwithpicto($langs->trans("Visibility
"), $langs->trans("VisibleDesc
").'<br><br>'.$langs->trans("ItCanBeAnExpression
")); ?>
295</td><td class="valeur
"><input id="list
" class="minwidth200
" type="text
" name="list
" value="<?php echo
dol_escape_htmltag(
GETPOSTISSET(
'list') ?
GETPOST(
'list') :
'1'); ?>
"></td></tr>
296<!-- Visibility for PDF-->
297<tr><td class="extra_pdf
"><?php echo $form->textwithpicto($langs->trans("DisplayOnPdf
"), $langs->trans("DisplayOnPdfDesc
")); ?>
298</td><td class="valeur
"><input id="printable
" class="width50
" type="text
" name="printable
" value="<?php echo dolPrintHTMLForAttribute(
GETPOSTISSET(
'printable') ?
GETPOST(
'printable') :
'0'); ?>
"></td></tr>
300<!-- Visibility for getNomUrl -->
301<tr><td class="extra_showintooltip
"><?php echo $form->textwithpicto($langs->trans("DisplayExtraOnTooltip
"), $langs->trans("DisplayExtraOnTooltipDesc
")); ?>
302</td><td class="valeur
"><input id="showintooltip
" type="checkbox
" name="showintooltip
" value="1
" <?php echo(GETPOST('showintooltip', 'alpha') ? ' checked' : ''); ?>></td></tr>
305<tr class="extra_totalizable
"><td><?php echo $langs->trans("Totalizable
"); ?></td><td class="valeur
"><input id="totalizable
" type="checkbox
" name="totalizable
" <?php echo(GETPOST('totalizable', 'alpha') ? ' checked' : ''); ?> ></td></tr>
307<tr class="help
"><td><?php echo $form->textwithpicto($langs->trans("HelpOnTooltip
"), $langs->trans("HelpOnTooltipDesc
")); ?></td><td class="valeur
"><input id="help
" class="quatrevingtpercent
" type="text
" name="help
" value="<?php echo
dol_escape_htmltag((empty($help) ?
'' : $help)); ?>
"></td></tr>
310<tr class="help
"><td><?php echo $form->textwithpicto($langs->trans("CssOnEdit
"), $langs->trans("HelpCssOnEditDesc
")); ?></td><td class="valeur
"><input id="css
" class="minwidth200
" type="text
" name="css
" value="<?php echo
dol_escape_htmltag((empty($css) ?
'' : $css)); ?>
"></td></tr>
312<tr class="help
"><td><?php echo $form->textwithpicto($langs->trans("CssOnView
"), $langs->trans("HelpCssOnViewDesc
")); ?></td><td class="valeur
"><input id="cssview
" class="minwidth200
" type="text
" name="cssview
" value="<?php echo
dol_escape_htmltag((empty($cssview) ?
'' : $cssview)); ?>
"></td></tr>
314<tr class="help
"><td><?php echo $form->textwithpicto($langs->trans("CssOnList
"), $langs->trans("HelpCssOnListDesc
")); ?></td><td class="valeur
"><input id="csslist
" class="minwidth200
" type="text
" name="csslist
" value="<?php echo
dol_escape_htmltag((empty($csslist) ?
'' : $csslist)); ?>
"></td></tr>
316<?php if (isModEnabled('multicompany')) { ?>
317 <!-- Multicompany entity -->
318 <tr><td><?php echo $langs->trans("AllEntities
"); ?></td><td class="valeur
"><input id="entitycurrentorall
" type="checkbox
" name="entitycurrentorall
"<?php echo(GETPOST('entitycurrentorall', 'alpha') ? ' checked' : ''); ?>></td></tr>
322<?php print dol_get_fiche_end(); ?>
324<div class="center
"><input type="submit
" name="button" class="button button-save
" value="<?php echo $langs->trans(
"Save"); ?>
">
325<input type="submit
" name="button" class="button button-cancel
" value="<?php echo $langs->trans(
"Cancel"); ?>
"></div>
329<!-- END PHP TEMPLATE admin_extrafields_add.tpl.php -->
$propal type
'integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]',...
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_escape_js($stringtoescape, $mode=0, $noescapebackslashn=0)
Returns text escaped for inclusion into JavaScript code.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
multi select button
0 = Do not include form tag and submit button -1 = Do not include form tag but include submit button
treeview li table
No Email.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Class to manage Dolibarr database access for an SQL database.
$conf db name
Only used if Module[ID]Name translation string is not found.