dolibarr 23.0.3
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-2025 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
43// Protection to avoid direct call of template
44if (empty($conf) || !is_object($conf)) {
45 print "Error, template page can't be called as URL";
46 exit(1);
47}
48
49
50$langs->load("modulebuilder");
51
52$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>...';
53
54?>
55
56<!-- BEGIN PHP TEMPLATE admin_extrafields_edit.tpl.php -->
57<script>
58 jQuery(document).ready(function() {
59 function init_typeoffields(type)
60 {
61 console.log("admin_extrafields_edit select a new type (edit) = "+type);
62 var size = jQuery("#size");
63 var computed_value = jQuery("#computed_value");
64 var langfile = jQuery("#langfile");
65 var default_value = jQuery("#default_value");
66 var unique = jQuery("#unique");
67 var required = jQuery("#required");
68 var alwayseditable = jQuery("#alwayseditable");
69 var emptyonclone = jQuery("#emptyonclone");
70 var list = jQuery("#list");
71 var totalizable = jQuery("#totalizable");
72 <?php
73 if ((GETPOST('type', 'alpha') != "select") && (GETPOST('type', 'alpha') != "sellist")) {
74 print 'jQuery("#value_choice").hide();';
75 }
76
77 if (in_array(GETPOST('type', 'alpha'), ["separate", 'point', 'linestrg', 'polygon'])) {
78 print "jQuery('#size, #default_value, #langfile').val('').prop('disabled', true);";
79 print 'jQuery("#value_choice").hide();';
80 }
81 ?>
82
83 // Case of computed field
84 if (type == 'varchar' || type == 'int' || type == 'double' || type == 'price') {
85 jQuery("tr.extra_computed_value").show();
86 } else {
87 computed_value.val(''); jQuery("tr.extra_computed_value").hide();
88 }
89 if (computed_value.val())
90 {
91 console.log("We enter a computed formula");
92 jQuery("#default_value").val('');
93 /* jQuery("#unique, #required, #alwayseditable, #list").removeAttr('checked'); */
94 jQuery("#default_value, #unique, #required, #alwayseditable, #emptyonclone, #list").attr('disabled', true);
95 jQuery("tr.extra_default_value, tr.extra_unique, tr.extra_required, tr.extra_alwayseditable, tr.extra_emptyonclone, tr.extra_list").hide();
96 }
97 else
98 {
99 console.log("No computed formula");
100 jQuery("#default_value, #unique, #required, #alwayseditable, #emptyonclone, #list").attr('disabled', false);
101 jQuery("tr.extra_default_value, tr.extra_unique, tr.extra_required, tr.extra_alwayseditable, tr.extra_emptyonclone, tr.extra_list").show();
102 }
103
104 // Case of ai prompt
105 if (type == 'text' || type == 'varchar' || type == 'int' || type == 'double' || type == 'price' || type == 'html') {
106 jQuery("tr.extra_ai_prompt").show();
107 } else {
108 jQuery(ai_prompt).val(''); jQuery("tr.extra_ai_prompt").hide();
109 }
110
111 if (type == 'date') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
112 else if (type == 'datetime') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
113 else if (type == 'double') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
114 else if (type == 'int') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
115 else if (type == 'text') { size.removeAttr('disabled'); unique.prop('disabled', true).removeAttr('checked'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
116 else if (type == 'html') { size.removeAttr('disabled'); unique.prop('disabled', true).removeAttr('checked'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
117 else if (type == 'varchar') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
118 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();}
119 else if (type == 'boolean') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
120 else if (type == 'price') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
121 else if (type == 'pricecy') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
122 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();}
123 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();}
124 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();}
125 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();}
126 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();}
127 else if (type == 'link') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").show(); jQuery(".spanforparamtooltip").hide(); jQuery("#helplink").show();}
128 else if (type == 'stars') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
129 else if (type == 'separate') {
130 size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); required.val('').prop('disabled', true); default_value.val('').prop('disabled', true);
131 jQuery("#value_choice").show();
132 jQuery(".spanforparamtooltip").hide(); jQuery("#helpseparate").show();
133 }
134 else { // type = string
135 size.val('').prop('disabled', true);
136 unique.removeAttr('disabled');
137 }
138
139 if (type == 'separate' || type == 'point' || type == 'linestrg' || type == 'polygon')
140 {
141 required.removeAttr('checked').prop('disabled', true); alwayseditable.removeAttr('checked').prop('disabled', true); emptyonclone.removeAttr('checked').prop('disabled', true); list.removeAttr('checked').prop('disabled', true);
142 jQuery('#size, #default_value, #langfile').val('').prop('disabled', true);
143 jQuery('#list').val(3); // visible on create/update/view form only
144 }
145 else
146 {
147 default_value.removeAttr('disabled');
148 required.removeAttr('disabled'); alwayseditable.removeAttr('disabled'); emptyonclone.removeAttr('disabled'); list.removeAttr('disabled');
149 }
150 }
151 init_typeoffields(jQuery("#type").val());
152 jQuery("#type").change(function() {
153 init_typeoffields($(this).val());
154 });
155
156 // If we enter a formula, we disable other fields
157 jQuery("#computed_value").keyup(function() {
158 init_typeoffields(jQuery('#type').val());
159 });
160 });
161</script>
162
163<!-- Form to edit an extra field -->
164<form action="<?php echo $_SERVER["PHP_SELF"]; ?>?attrname=<?php echo $attrname; ?>" id="formeditextrafield" method="post">
165<input type="hidden" name="token" value="<?php echo newToken(); ?>">
166<input type="hidden" name="attrname" value="<?php echo $attrname; ?>">
167<input type="hidden" name="action" value="update">
168<input type="hidden" name="rowid" value="<?php echo(empty($rowid) ? '' : $rowid) ?>">
169<input type="hidden" name="enabled" value="<?php echo dol_escape_htmltag((string) $extrafields->attributes[$elementtype]['enabled'][$attrname]); ?>">
170
171<?php print dol_get_fiche_head(); ?>
172
173<table summary="listofattributes" class="border centpercent">
174
175<?php
176$label = $extrafields->attributes[$elementtype]['label'][$attrname];
177$type = $extrafields->attributes[$elementtype]['type'][$attrname];
178$size = $extrafields->attributes[$elementtype]['size'][$attrname];
179$computed = $extrafields->attributes[$elementtype]['computed'][$attrname];
180$aiprompt = $extrafields->attributes[$elementtype]['aiprompt'][$attrname];
181$default = $extrafields->attributes[$elementtype]['default'][$attrname];
182$unique = $extrafields->attributes[$elementtype]['unique'][$attrname];
183$required = $extrafields->attributes[$elementtype]['required'][$attrname];
184$pos = $extrafields->attributes[$elementtype]['pos'][$attrname];
185$alwayseditable = $extrafields->attributes[$elementtype]['alwayseditable'][$attrname];
186$emptyonclone = $extrafields->attributes[$elementtype]['emptyonclone'][$attrname];
187$param = $extrafields->attributes[$elementtype]['param'][$attrname];
188$perms = $extrafields->attributes[$elementtype]['perms'][$attrname];
189$langfile = $extrafields->attributes[$elementtype]['langfile'][$attrname];
190$list = $extrafields->attributes[$elementtype]['list'][$attrname];
191$totalizable = $extrafields->attributes[$elementtype]['totalizable'][$attrname];
192$help = $extrafields->attributes[$elementtype]['help'][$attrname];
193$entitycurrentorall = $extrafields->attributes[$elementtype]['entityid'][$attrname];
194$printable = $extrafields->attributes[$elementtype]['printable'][$attrname];
195$enabled = $extrafields->attributes[$elementtype]['enabled'][$attrname];
196$css = $extrafields->attributes[$elementtype]['css'][$attrname];
197$cssview = $extrafields->attributes[$elementtype]['cssview'][$attrname];
198$csslist = $extrafields->attributes[$elementtype]['csslist'][$attrname];
199
200$param_chain = '';
201if (is_array($param)) {
202 if (($type == 'select') || ($type == 'checkbox') || ($type == 'radio')) {
203 foreach ($param['options'] as $key => $value) {
204 if (strlen($key)) {
205 $param_chain .= $key.','.$value."\n";
206 }
207 }
208 } elseif (($type == 'sellist') || ($type == 'chkbxlst') || ($type == 'link') || ($type == 'password') || ($type == 'separate')) {
209 $paramlist = array_keys($param['options']);
210 $param_chain = $paramlist[0];
211 }
212}
213?>
214<!-- Label -->
215<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>
216
217<!-- Code -->
218<tr><td class="fieldrequired"><?php echo $form->textwithpicto($langs->trans("AttributeCode"), $langs->trans("AttributeCodeHelp")); ?></td><td class="valeur"><?php echo $attrname; ?></td></tr>
219
220<!-- Type -->
221<tr><td class="fieldrequired"><?php echo $langs->trans("Type"); ?></td><td class="valeur">
222<?php
223// Define list of possible type transition
224$typewecanchangeinto = array(
225 'varchar' => array('varchar', 'phone', 'mail', 'url', 'ip', 'select', 'password', 'text', 'html'),
226 'double' => array('double', 'price'),
227 'price' => array('double', 'price'),
228 'text' => array('text', 'html'),
229 'html' => array('text', 'html'),
230 'password' => array('password', 'varchar'),
231 'mail' => array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
232 'url' => array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
233 'phone' => array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
234 'ip' => array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
235 'select' => array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
236 'date' => array('date', 'datetime')
237);
238/* Disabled because text is text on several lines, when varchar is text on 1 line, we should not be able to convert
239if ($size <= 255 && in_array($type, array('text', 'html'))) {
240 $typewecanchangeinto['text'][] = 'varchar';
241}*/
242
243if (in_array($type, array_keys($typewecanchangeinto))) {
244 // Combo with list of fields
245 if (empty($formadmin)) {
246 include_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
247 $formadmin = new FormAdmin($db);
248 }
249 print $formadmin->selectTypeOfFields('type', GETPOST('type', 'alpha') ? GETPOST('type', 'alpha') : $type, $typewecanchangeinto);
250} else {
251 print getPictoForType($type);
252 print $type2label[$type];
253 print '<input type="hidden" name="type" id="type" value="'.$type.'">';
254}
255?>
256</td></tr>
257
258<!-- Size -->
259<tr class="extra_size"><td><?php echo $langs->trans("Size"); ?></td><td><input id="size" type="text" name="size" class="width50" value="<?php echo $size; ?>"></td></tr>
260
261<!-- Value (for some fields like password, select list, radio, ...) -->
262<tr id="value_choice">
263<td>
264 <?php echo $langs->trans("Value"); ?>
265</td>
266<td>
267 <table class="nobordernopadding">
268 <tr><td>
269 <textarea name="param" id="param" cols="80" rows="<?php echo ROWS_4 ?>" spellcheck="false"><?php echo dol_htmlcleanlastbr($param_chain); ?></textarea>
270 </td><td>
271 <span id="helpselect" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"), 1, 'info', '', 0, 2, 'helpvalue1')?></span>
272 <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>
273 <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>
274 <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>
275 <span id="helppassword" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpPassword"), 1, 'info', '', 0, 2, 'helpvalue5')?></span>
276 <span id="helpseparate" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpSeparator"), 1, 'info', '', 0, 2, 'helpvalue6')?></span>
277 </td></tr>
278 </table>
279</td>
280</tr>
281
282<!-- Position -->
283<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>
284
285<!-- Language file -->
286<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>
287
288<!-- Computed value -->
289<tr class="extra_computed_value">
290<?php if (!getDolGlobalString('MAIN_STORE_COMPUTED_EXTRAFIELDS')) { ?>
291 <td><?php echo $form->textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc", '$db, $langs, $mysoc, $user, $objectoffield').'<br>'.$langs->trans("ComputedFormulaDesc2").'<br><br>'.$langs->trans("ComputedFormulaDesc3"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?></td>
292<?php } else { ?>
293 <td><?php echo $form->textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc", '$db, $langs, $mysoc, $user, $objectoffield').'<br>'.$langs->trans("ComputedFormulaDesc2").'<br><br>'.$langs->trans("ComputedFormulaDesc3")).$form->textwithpicto($langs->trans("Computedpersistent"), $langs->trans("ComputedpersistentDesc"), 1, 'warning'); ?></td>
294<?php } ?>
295<td class="valeur"><textarea name="computed_value" id="computed_value" class="quatrevingtpercent" rows="<?php echo ROWS_4 ?>"><?php echo dol_htmlcleanlastbr($computed); ?></textarea></td>
296</tr>
297
298<!-- AI Prompt -->
299<tr class="extra_ai_prompt">
300 <td><?php
301 if ($elementtype == "projet") {
302 $elementtype = "project";
303 }
304 $elementprop = getElementProperties($elementtype);
305 $object = fetchObjectByElement(0, $elementtype);
306 if ($elementprop["module"] == "adherent") {
307 $elementprop["module"] = "member";
308 }
309 if ($elementprop["module"] == "projet") {
310 $elementprop["module"] = "project";
311 }
312 if ($elementprop["module"] == "contrat") {
313 $elementprop["module"] = "contract";
314 $object->element = "contract";
315 }
316 if ($elementprop["module"] == "ficheinter") {
317 $elementprop["module"] = "intervention";
318 }
319 $substitutionarray = getCommonSubstitutionArray($langs, 1, null, $object, array("object", $elementprop["module"]));
320 $texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
321 foreach ($substitutionarray as $key => $val) {
322 $texthelp .= $key.' -> '.$val.'<br>';
323 }
324 echo $form->textwithpicto($langs->trans("AIPromptExtrafield"), $texthelp, 1, 'help', 'valignmiddle', 0, 3, 'abc');?></td>
325<td class="valeur"><textarea name="ai_prompt" id="ai_prompt" class="quatrevingtpercent" rows="<?php echo ROWS_4 ?>"><?php echo($aiprompt); ?></textarea></td></tr>
326
327<!-- Default Value (at sql setup level) -->
328<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>
329
330<!-- Unique -->
331<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>
332
333<!-- Required -->
334<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>
335
336<!-- Always editable -->
337<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>
338
339<!-- Empty on clone -->
340<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($emptyonclone ? ' checked' : ''); ?>></td></tr>
341
342<!-- Permission to edit -->
343<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>
344
345<!-- Visibility -->
346<tr><td class="extra_list"><?php echo $form->textwithpicto($langs->trans("Visibility"), $langs->trans("VisibleDesc").'<br><br>'.$langs->trans("ItCanBeAnExpression")); ?>
347</td><td class="valeur"><input id="list" class="minwidth200" type="text" name="list" value="<?php echo($list != '' ? $list : '1'); ?>"></td></tr>
348
349<!-- Visibility for PDF-->
350<tr><td class="extra_pdf"><?php echo $form->textwithpicto($langs->trans("DisplayOnPdf"), $langs->trans("DisplayOnPdfDesc")); ?>
351</td><td class="valeur"><input id="printable" class="width50" type="text" name="printable" value="<?php echo dol_escape_htmltag((string) $printable); ?>"></td></tr>
352
353<!-- Can be summed -->
354<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>
355
356<!-- Help tooltip -->
357<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>
358
359<!-- Css edit -->
360<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>
361
362<!-- Css view -->
363<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>
364
365<!-- Css list -->
366<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>
367
368<?php if (isModEnabled('multicompany')) { ?>
369 <!-- Multicompany entity -->
370 <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>
371<?php } ?>
372
373<!-- Show Enabled property when value is not a common value -->
374<?php if ($enabled != '1') { ?>
375 <tr class="help"><td><?php echo $form->textwithpicto($langs->trans("EnabledCondition"), $langs->trans("EnabledConditionHelp")); ?></td><td class="valeur">
376 <?php echo dol_escape_htmltag((string) $enabled); ?>
377<?php } ?>
378</td></tr>
379
380</table>
381
382<?php print dol_get_fiche_end(); ?>
383
384<div class="center"><input type="submit" name="button" class="button button-save" value="<?php echo $langs->trans("Save"); ?>">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
385<input type="submit" name="button" class="button button-cancel" value="<?php echo $langs->trans("Cancel"); ?>"></div>
386
387</form>
388
389<!-- END PHP TEMPLATE admin_extrafields_edit.tpl.php -->
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
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.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
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.
if(preg_match('/(crypted|dolcrypt):/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
'integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]',...
Definition repair.php:125
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:128