dolibarr 22.0.5
admin_extrafields_edit.tpl.php
1<?php
2/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
4 * Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
5 * Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
42// Protection to avoid direct call of template
43if (empty($conf) || !is_object($conf)) {
44 print "Error, template page can't be called as URL";
45 exit(1);
46}
47
48
49$langs->load("modulebuilder");
50
51$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<br>...';
52
53?>
54
55<!-- BEGIN PHP TEMPLATE admin_extrafields_edit.tpl.php -->
56<script>
57 jQuery(document).ready(function() {
58 function init_typeoffields(type)
59 {
60 console.log("select a new type (edit) = "+type);
61 var size = jQuery("#size");
62 var computed_value = jQuery("#computed_value");
63 var langfile = jQuery("#langfile");
64 var default_value = jQuery("#default_value");
65 var unique = jQuery("#unique");
66 var required = jQuery("#required");
67 var alwayseditable = jQuery("#alwayseditable");
68 var list = jQuery("#list");
69 var totalizable = jQuery("#totalizable");
70 <?php
71 if ((GETPOST('type', 'alpha') != "select") && (GETPOST('type', 'alpha') != "sellist")) {
72 print 'jQuery("#value_choice").hide();';
73 }
74
75 if (in_array(GETPOST('type', 'alpha'), ["separate", 'point', 'linestrg', 'polygon'])) {
76 print "jQuery('#size, #default_value, #langfile').val('').prop('disabled', true);";
77 print 'jQuery("#value_choice").hide();';
78 }
79 ?>
80
81 // Case of computed field
82 if (type == 'varchar' || type == 'int' || type == 'double' || type == 'price') {
83 jQuery("tr.extra_computed_value").show();
84 } else {
85 computed_value.val(''); jQuery("tr.extra_computed_value").hide();
86 }
87 if (computed_value.val())
88 {
89 console.log("We enter a computed formula");
90 jQuery("#default_value").val('');
91 /* jQuery("#unique, #required, #alwayseditable, #list").removeAttr('checked'); */
92 jQuery("#default_value, #unique, #required, #alwayseditable, #list").attr('disabled', true);
93 jQuery("tr.extra_default_value, tr.extra_unique, tr.extra_required, tr.extra_alwayseditable, tr.extra_list").hide();
94 }
95 else
96 {
97 console.log("No computed formula");
98 jQuery("#default_value, #unique, #required, #alwayseditable, #list").attr('disabled', false);
99 jQuery("tr.extra_default_value, tr.extra_unique, tr.extra_required, tr.extra_alwayseditable, tr.extra_list").show();
100 }
101
102 // Case of ai prompt
103 if (type == 'text' || type == 'varchar' || type == 'int' || type == 'double' || type == 'price' || type == 'html') {
104 jQuery("tr.extra_ai_prompt").show();
105 } else {
106 jQuery(ai_prompt).val(''); jQuery("tr.extra_ai_prompt").hide();
107 }
108
109 if (type == 'date') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
110 else if (type == 'datetime') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
111 else if (type == 'double') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
112 else if (type == 'int') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
113 else if (type == 'text') { size.removeAttr('disabled'); unique.prop('disabled', true).removeAttr('checked'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
114 else if (type == 'html') { size.removeAttr('disabled'); unique.prop('disabled', true).removeAttr('checked'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
115 else if (type == 'varchar') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
116 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();}
117 else if (type == 'boolean') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
118 else if (type == 'price') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
119 else if (type == 'pricecy') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
120 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();}
121 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();}
122 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();}
123 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();}
124 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();}
125 else if (type == 'link') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").show(); jQuery(".spanforparamtooltip").hide(); jQuery("#helplink").show();}
126 else if (type == 'stars') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
127 else if (type == 'separate') {
128 size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); required.val('').prop('disabled', true); default_value.val('').prop('disabled', true);
129 jQuery("#value_choice").show();
130 jQuery(".spanforparamtooltip").hide(); jQuery("#helpseparate").show();
131 }
132 else { // type = string
133 size.val('').prop('disabled', true);
134 unique.removeAttr('disabled');
135 }
136
137 if (type == 'separate' || type == 'point' || type == 'linestrg' || type == 'polygon')
138 {
139 required.removeAttr('checked').prop('disabled', true); alwayseditable.removeAttr('checked').prop('disabled', true); list.removeAttr('checked').prop('disabled', true);
140 jQuery('#size, #default_value, #langfile').val('').prop('disabled', true);
141 jQuery('#list').val(3); // visible on create/update/view form only
142 }
143 else
144 {
145 default_value.removeAttr('disabled');
146 required.removeAttr('disabled'); alwayseditable.removeAttr('disabled'); list.removeAttr('disabled');
147 }
148 }
149 init_typeoffields(jQuery("#type").val());
150 jQuery("#type").change(function() {
151 init_typeoffields($(this).val());
152 });
153
154 // If we enter a formula, we disable other fields
155 jQuery("#computed_value").keyup(function() {
156 init_typeoffields(jQuery('#type').val());
157 });
158 });
159</script>
160
161<!-- Form to edit an extra field -->
162<form action="<?php echo $_SERVER["PHP_SELF"]; ?>?attrname=<?php echo $attrname; ?>" id="formeditextrafield" method="post">
163<input type="hidden" name="token" value="<?php echo newToken(); ?>">
164<input type="hidden" name="attrname" value="<?php echo $attrname; ?>">
165<input type="hidden" name="action" value="update">
166<input type="hidden" name="rowid" value="<?php echo(empty($rowid) ? '' : $rowid) ?>">
167<input type="hidden" name="enabled" value="<?php echo dol_escape_htmltag((string) $extrafields->attributes[$elementtype]['enabled'][$attrname]); ?>">
168
169<?php print dol_get_fiche_head(); ?>
170
171<table summary="listofattributes" class="border centpercent">
172
173<?php
174$label = $extrafields->attributes[$elementtype]['label'][$attrname];
175$type = $extrafields->attributes[$elementtype]['type'][$attrname];
176$size = $extrafields->attributes[$elementtype]['size'][$attrname];
177$computed = $extrafields->attributes[$elementtype]['computed'][$attrname];
178$aiprompt = $extrafields->attributes[$elementtype]['aiprompt'][$attrname];
179$default = $extrafields->attributes[$elementtype]['default'][$attrname];
180$unique = $extrafields->attributes[$elementtype]['unique'][$attrname];
181$required = $extrafields->attributes[$elementtype]['required'][$attrname];
182$pos = $extrafields->attributes[$elementtype]['pos'][$attrname];
183$alwayseditable = $extrafields->attributes[$elementtype]['alwayseditable'][$attrname];
184$param = $extrafields->attributes[$elementtype]['param'][$attrname];
185$perms = $extrafields->attributes[$elementtype]['perms'][$attrname];
186$langfile = $extrafields->attributes[$elementtype]['langfile'][$attrname];
187$list = $extrafields->attributes[$elementtype]['list'][$attrname];
188$totalizable = $extrafields->attributes[$elementtype]['totalizable'][$attrname];
189$help = $extrafields->attributes[$elementtype]['help'][$attrname];
190$entitycurrentorall = $extrafields->attributes[$elementtype]['entityid'][$attrname];
191$printable = $extrafields->attributes[$elementtype]['printable'][$attrname];
192$enabled = $extrafields->attributes[$elementtype]['enabled'][$attrname];
193$css = $extrafields->attributes[$elementtype]['css'][$attrname];
194$cssview = $extrafields->attributes[$elementtype]['cssview'][$attrname];
195$csslist = $extrafields->attributes[$elementtype]['csslist'][$attrname];
196
197$param_chain = '';
198if (is_array($param)) {
199 if (($type == 'select') || ($type == 'checkbox') || ($type == 'radio')) {
200 foreach ($param['options'] as $key => $value) {
201 if (strlen($key)) {
202 $param_chain .= $key.','.$value."\n";
203 }
204 }
205 } elseif (($type == 'sellist') || ($type == 'chkbxlst') || ($type == 'link') || ($type == 'password') || ($type == 'separate')) {
206 $paramlist = array_keys($param['options']);
207 $param_chain = $paramlist[0];
208 }
209}
210?>
211<!-- Label -->
212<tr><td class="titlefieldcreate fieldrequired"><?php echo $langs->trans("LabelOrTranslationKey"); ?></td><td class="valeur"><input type="text" name="label" size="40" value="<?php echo $label; ?>"></td></tr>
213
214<!-- Code -->
215<tr><td class="fieldrequired"><?php echo $form->textwithpicto($langs->trans("AttributeCode"), $langs->trans("AttributeCodeHelp")); ?></td><td class="valeur"><?php echo $attrname; ?></td></tr>
216
217<!-- Type -->
218<tr><td class="fieldrequired"><?php echo $langs->trans("Type"); ?></td><td class="valeur">
219<?php
220// Define list of possible type transition
221$typewecanchangeinto = array(
222 'varchar' => array('varchar', 'phone', 'mail', 'url', 'ip', 'select', 'password', 'text', 'html'),
223 'double' => array('double', 'price'),
224 'price' => array('double', 'price'),
225 'text' => array('text', 'html'),
226 'html' => array('text', 'html'),
227 'password' => array('password', 'varchar'),
228 'mail' => array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
229 'url' => array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
230 'phone' => array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
231 'ip' => array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
232 'select' => array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
233 'date' => array('date', 'datetime')
234);
235/* Disabled because text is text on several lines, when varchar is text on 1 line, we should not be able to convert
236if ($size <= 255 && in_array($type, array('text', 'html'))) {
237 $typewecanchangeinto['text'][] = 'varchar';
238}*/
239
240if (in_array($type, array_keys($typewecanchangeinto))) {
241 // Combo with list of fields
242 if (empty($formadmin)) {
243 include_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
244 $formadmin = new FormAdmin($db);
245 }
246 print $formadmin->selectTypeOfFields('type', GETPOST('type', 'alpha') ? GETPOST('type', 'alpha') : $type, $typewecanchangeinto);
247} else {
248 print getPictoForType($type);
249 print $type2label[$type];
250 print '<input type="hidden" name="type" id="type" value="'.$type.'">';
251}
252?>
253</td></tr>
254
255<!-- Size -->
256<tr class="extra_size"><td class="fieldrequired"><?php echo $langs->trans("Size"); ?></td><td><input id="size" type="text" name="size" class="width50" value="<?php echo $size; ?>"></td></tr>
257
258<!-- Value (for some fields like password, select list, radio, ...) -->
259<tr id="value_choice">
260<td>
261 <?php echo $langs->trans("Value"); ?>
262</td>
263<td>
264 <table class="nobordernopadding">
265 <tr><td>
266 <textarea name="param" id="param" cols="80" rows="<?php echo ROWS_4 ?>" spellcheck="false"><?php echo dol_htmlcleanlastbr($param_chain); ?></textarea>
267 </td><td>
268 <span id="helpselect" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"), 1, 'info', '', 0, 2, 'helpvalue1')?></span>
269 <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>
270 <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>
271 <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>
272 <span id="helppassword" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpPassword"), 1, 'info', '', 0, 2, 'helpvalue5')?></span>
273 <span id="helpseparate" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpSeparator"), 1, 'info', '', 0, 2, 'helpvalue6')?></span>
274 </td></tr>
275 </table>
276</td>
277</tr>
278
279<!-- Position -->
280<tr><td class="titlefield"><?php echo $langs->trans("Position"); ?></td><td class="valeur"><input type="text" name="pos" class="width50" value="<?php echo dol_escape_htmltag((string) $pos); ?>"></td></tr>
281
282<!-- Language file -->
283<tr><td class="titlefield"><?php echo $langs->trans("LanguageFile"); ?></td><td class="valeur"><input type="text" name="langfile" class="minwidth200" value="<?php echo dol_escape_htmltag($langfile); ?>"></td></tr>
284
285<!-- Computed value -->
286<tr class="extra_computed_value">
287<?php if (!getDolGlobalString('MAIN_STORE_COMPUTED_EXTRAFIELDS')) { ?>
288 <td><?php echo $form->textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?></td>
289<?php } else { ?>
290 <td><?php echo $form->textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc")).$form->textwithpicto($langs->trans("Computedpersistent"), $langs->trans("ComputedpersistentDesc"), 1, 'warning'); ?></td>
291<?php } ?>
292<td class="valeur"><textarea name="computed_value" id="computed_value" class="quatrevingtpercent" rows="<?php echo ROWS_4 ?>"><?php echo dol_htmlcleanlastbr($computed); ?></textarea></td>
293</tr>
294
295<!-- AI Prompt -->
296<tr class="extra_ai_prompt">
297 <td><?php
298 if ($elementtype == "projet") {
299 $elementtype = "project";
300 }
301 $elementprop = getElementProperties($elementtype);
302 $object = fetchObjectByElement(0, $elementtype);
303 if ($elementprop["module"] == "adherent") {
304 $elementprop["module"] = "member";
305 }
306 if ($elementprop["module"] == "projet") {
307 $elementprop["module"] = "project";
308 }
309 if ($elementprop["module"] == "contrat") {
310 $elementprop["module"] = "contract";
311 $object->element = "contract";
312 }
313 if ($elementprop["module"] == "ficheinter") {
314 $elementprop["module"] = "intervention";
315 }
316 $substitutionarray = getCommonSubstitutionArray($langs, 1, null, $object, array("object", $elementprop["module"]));
317 $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
318 foreach ($substitutionarray as $key => $val) {
319 $texthelp .= $key.' -> '.$val.'<br>';
320 }
321 echo $form->textwithpicto($langs->trans("AIPromptExtrafield"), $texthelp, 1, 'help', 'valignmiddle', 0, 3, 'abc');?></td>
322<td class="valeur"><textarea name="ai_prompt" id="ai_prompt" class="quatrevingtpercent" rows="<?php echo ROWS_4 ?>"><?php echo($aiprompt); ?></textarea></td></tr>
323
324<!-- Default Value (at sql setup level) -->
325<tr class="extra_default_value"><td><?php echo $langs->trans("DefaultValue").' ('.$langs->trans("Database").')'; ?></td><td class="valeur"><input id="default_value" type="text" name="default_value" class="minwidth200" value="<?php echo dol_escape_htmltag($default); ?>"></td></tr>
326
327<!-- Unique -->
328<tr class="extra_unique"><td><?php echo $langs->trans("Unique"); ?></td><td class="valeur"><input id="unique" type="checkbox" name="unique"<?php echo($unique ? ' checked' : ''); ?>></td></tr>
329
330<!-- Required -->
331<tr class="extra_required"><td><?php echo $langs->trans("Mandatory"); ?></td><td class="valeur"><input id="required" type="checkbox" name="required"<?php echo($required ? ' checked' : ''); ?>></td></tr>
332
333<!-- Always editable -->
334<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($alwayseditable ? ' checked' : ''); ?>></td></tr>
335
336<!-- Permission to edit -->
337<tr class="extra_perms"><td><?php echo $form->textwithpicto($langs->trans("PermissionOnField"), $langs->trans("PermissionToEditField")); ?></td><td class="valeur"><input id="perms" class="minwidth200" type="text" name="perms" value="<?php echo $perms; ?>"></td></tr>
338
339<!-- Visibility -->
340<tr><td class="extra_list"><?php echo $form->textwithpicto($langs->trans("Visibility"), $langs->trans("VisibleDesc").'<br><br>'.$langs->trans("ItCanBeAnExpression")); ?>
341</td><td class="valeur"><input id="list" class="width50" type="text" name="list" value="<?php echo($list != '' ? $list : '1'); ?>"></td></tr>
342
343<!-- Visibility for PDF-->
344<tr><td class="extra_pdf"><?php echo $form->textwithpicto($langs->trans("DisplayOnPdf"), $langs->trans("DisplayOnPdfDesc")); ?>
345</td><td class="valeur"><input id="printable" class="width50" type="text" name="printable" value="<?php echo dol_escape_htmltag((string) $printable); ?>"></td></tr>
346
347<!-- Can be summed -->
348<tr class="extra_totalizable"><td><?php echo $form->textwithpicto($langs->trans("Totalizable"), $langs->trans("TotalizableDesc")); ?></td><td class="valeur"><input id="totalizable" type="checkbox" name="totalizable"<?php echo($totalizable ? ' checked' : ''); ?>></td></tr>
349
350<!-- Css edit -->
351<tr class="extra_css"><td><?php echo $form->textwithpicto($langs->trans("CssOnEdit"), $langs->trans("HelpCssOnEditDesc")); ?></td><td class="valeur"><input id="css" type="text" class="minwidth200" name="css" value="<?php echo $css ?>"></td></tr>
352
353<!-- Css view -->
354<tr class="extra_cssview"><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 $cssview; ?>"></td></tr>
355
356<!-- Css list -->
357<tr class="extra_csslist"><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 $csslist; ?>"></td></tr>
358
359<!-- Help tooltip -->
360<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($help); ?>"></td></tr>
361
362<?php if (isModEnabled('multicompany')) { ?>
363 <!-- Multicompany entity -->
364 <tr><td><?php echo $langs->trans("AllEntities"); ?></td><td class="valeur"><input id="entitycurrentorall" type="checkbox" name="entitycurrentorall"<?php echo(empty($entitycurrentorall) ? ' checked' : ''); ?>></td></tr>
365<?php } ?>
366
367<!-- Show Enabled property when value is not a common value -->
368<?php if ($enabled != '1') { ?>
369 <tr class="help"><td><?php echo $form->textwithpicto($langs->trans("EnabledCondition"), $langs->trans("EnabledConditionHelp")); ?></td><td class="valeur">
370 <?php echo dol_escape_htmltag((string) $enabled); ?>
371<?php } ?>
372</td></tr>
373
374</table>
375
376<?php print dol_get_fiche_end(); ?>
377
378<div class="center"><input type="submit" name="button" class="button button-save" value="<?php echo $langs->trans("Save"); ?>">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
379<input type="submit" name="button" class="button button-cancel" value="<?php echo $langs->trans("Cancel"); ?>"></div>
380
381</form>
382
383<!-- END PHP TEMPLATE admin_extrafields_edit.tpl.php -->
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:67
Class to generate html code for admin pages.
Class to manage generation of HTML components Only common components must be here.
Class for Position.
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_get_fiche_end($notab=0)
Return tab footer of a card.
getPictoForType($key, $morecss='')
Return the picto for a data type.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
getElementProperties($elementType)
Get an array with properties of an element.
dol_htmlcleanlastbr($stringtodecode)
This function remove all ending and br at end.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
fetchObjectByElement($element_id, $element_type, $element_ref='', $useCache=0, $maxCacheByType=10)
Fetch an object from its id and element_type Inclusion of classes is automatic.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
treeview li table
No Email.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
if(preg_match('/(crypted|dolcrypt):/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
Definition repair.php:158
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:161