diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index 5aba990c14f..bd360a7e481 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -1202,12 +1202,8 @@ if ($action == 'create') {
}
print "\n";
-} else /* *************************************************************************** */
-/* */
-/* Mode vue et edition */
-/* */
-/* *************************************************************************** */
-{
+} else {
+ // View and edit mode
$now = dol_now();
if ($object->id > 0) {
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 48774c0fe66..0cd217010c5 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -4745,6 +4745,18 @@ class Form
$more .= '
';
- print "| ".$extrafields->attributes[$elementtype]['pos'][$key]." | \n";
- print "".$extrafields->attributes[$elementtype]['label'][$key]." | \n"; // We don't translate here, we want admin to know what is the key not translated value
+ // Position
+ print "".dol_escape_htmltag($extrafields->attributes[$elementtype]['pos'][$key])." | \n";
+ // Label
+ print "".dol_escape_htmltag($extrafields->attributes[$elementtype]['label'][$key])." | \n"; // We don't translate here, we want admin to know what is the key not translated value
+ // Label translated
print "".$langs->trans($extrafields->attributes[$elementtype]['label'][$key])." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attributes[$elementtype]['type'][$key]]." | \n";
- print ''.$extrafields->attributes[$elementtype]['size'][$key]." | \n";
- print ''.dol_trunc($extrafields->attributes[$elementtype]['computed'][$key], 20)." | \n";
+ // Key
+ print "".dol_escape_htmltag($key)." | \n";
+ // Type
+ print "".dol_escape_htmltag($type2label[$extrafields->attributes[$elementtype]['type'][$key]])." | \n";
+ // Size
+ print ''.dol_escape_htmltag($extrafields->attributes[$elementtype]['size'][$key])." | \n";
+ // Computed field
+ print ''.dol_escape_htmltag($extrafields->attributes[$elementtype]['computed'][$key])." | \n";
+ // Is unique ?
print ''.yn($extrafields->attributes[$elementtype]['unique'][$key])." | \n";
+ // Is mandatory ?
print ''.yn($extrafields->attributes[$elementtype]['required'][$key])." | \n";
+ // Can always be editable ?
print ''.yn($extrafields->attributes[$elementtype]['alwayseditable'][$key])." | \n";
- print ''.$extrafields->attributes[$elementtype]['list'][$key]." | \n";
- print ''.$extrafields->attributes[$elementtype]['printable'][$key]." | \n";
+ // Visible
+ print ''.dol_escape_htmltag($extrafields->attributes[$elementtype]['list'][$key])." | \n";
+ // Print on PDF
+ print ''.dol_escape_htmltag($extrafields->attributes[$elementtype]['printable'][$key])." | \n";
+ // Summable
print ''.yn($extrafields->attributes[$elementtype]['totalizable'][$key])." | \n";
if (!empty($conf->multicompany->enabled)) {
print '';
@@ -116,8 +129,8 @@ if (isset($extrafields->attributes[$elementtype]['type']) && is_array($extrafiel
print ' | ';
}
print '';
- print ''.img_edit().'';
- print ' '.img_delete().'';
+ print ''.img_edit().'';
+ print ' '.img_delete().'';
print ' | '."\n";
print "
";
}