diff --git a/htdocs/adherents/admin/adherent_extrafields.php b/htdocs/adherents/admin/adherent_extrafields.php
index 1c98c2c16ba..fc820100315 100644
--- a/htdocs/adherents/admin/adherent_extrafields.php
+++ b/htdocs/adherents/admin/adherent_extrafields.php
@@ -58,6 +58,8 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
* View
*/
+$textobject = $langs->transnoentitiesnoconv("Members");
+
$help_url='EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
llxHeader('',$langs->trans("MembersSetup"),$help_url);
@@ -70,42 +72,7 @@ $head = member_admin_prepare_head();
dol_fiche_head($head, 'attributes', $langs->trans("Members"), 0, 'user');
-
-print $langs->trans("DefineHereComplementaryAttributes", $langs->transnoentitiesnoconv("Members")).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "
";
-
-print '';
-print '| '.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/adherents/admin/adherent_type_extrafields.php b/htdocs/adherents/admin/adherent_type_extrafields.php
index 627d96acf17..4164be44f64 100644
--- a/htdocs/adherents/admin/adherent_type_extrafields.php
+++ b/htdocs/adherents/admin/adherent_type_extrafields.php
@@ -74,42 +74,7 @@ $head = member_admin_prepare_head();
dol_fiche_head($head, 'attributes_type', $langs->trans("Members"), 0, 'user');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/admin/agenda_extrafields.php b/htdocs/admin/agenda_extrafields.php
index c5f7d808302..f03af469bca 100644
--- a/htdocs/admin/agenda_extrafields.php
+++ b/htdocs/admin/agenda_extrafields.php
@@ -76,41 +76,7 @@ $head=agenda_prepare_head();
dol_fiche_head($head, 'attributes', $langs->trans("Agenda"), 0, 'action');
-print $langs->trans("DefineHereComplementaryAttributes", $langs->transnoentitiesnoconv("Agenda")).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/admin/bank_extrafields.php b/htdocs/admin/bank_extrafields.php
index c896ecc5c48..5bec4097d35 100644
--- a/htdocs/admin/bank_extrafields.php
+++ b/htdocs/admin/bank_extrafields.php
@@ -59,6 +59,8 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
* View
*/
+$textobject = $langs->transnoentitiesnoconv("Bank");
+
llxHeader('',$langs->trans("BankSetupModule"),$help_url);
@@ -70,45 +72,7 @@ $head = bank_admin_prepare_head(null);
dol_fiche_head($head, 'attributes', $langs->trans("BankSetupModule"), 0, 'account');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Position").' | ';
-print ''.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_pos[$key]." | \n";
- print "".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
- // $i++;
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/admin/order_extrafields.php b/htdocs/admin/order_extrafields.php
index 81b7e74a479..cbaee8179dd 100644
--- a/htdocs/admin/order_extrafields.php
+++ b/htdocs/admin/order_extrafields.php
@@ -77,42 +77,7 @@ $head = order_admin_prepare_head();
dol_fiche_head($head, 'attributes', $langs->trans("Orders"), 0, 'order');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/admin/orderdet_extrafields.php b/htdocs/admin/orderdet_extrafields.php
index 515714a51e4..dfd81b4241e 100644
--- a/htdocs/admin/orderdet_extrafields.php
+++ b/htdocs/admin/orderdet_extrafields.php
@@ -66,7 +66,7 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
* View
*/
-$textobject=$langs->transnoentitiesnoconv("Orders");
+$textobject=$langs->transnoentitiesnoconv("OrderLines");
llxHeader('',$langs->trans("OrdersSetup"));
@@ -76,44 +76,9 @@ print "
\n";
$head = order_admin_prepare_head();
-dol_fiche_head($head, 'attributeslines', $langs->trans("Orders"), 0, 'order');
+dol_fiche_head($head, 'attributeslines', $langs->trans("OrderLines"), 0, 'order');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/admin/supplierinvoice_extrafields.php b/htdocs/admin/supplierinvoice_extrafields.php
index e1f71d8d147..bff385cfb45 100644
--- a/htdocs/admin/supplierinvoice_extrafields.php
+++ b/htdocs/admin/supplierinvoice_extrafields.php
@@ -81,42 +81,7 @@ $head = supplierorder_admin_prepare_head();
dol_fiche_head($head, 'supplierinvoice', $langs->trans("Suppliers"), 0, 'company');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/admin/supplierinvoicedet_extrafields.php b/htdocs/admin/supplierinvoicedet_extrafields.php
index 3596fc50d72..e05ed75bb0f 100644
--- a/htdocs/admin/supplierinvoicedet_extrafields.php
+++ b/htdocs/admin/supplierinvoicedet_extrafields.php
@@ -81,42 +81,7 @@ $head = supplierorder_admin_prepare_head();
dol_fiche_head($head, 'supplierinvoicedet', $langs->trans("Suppliers"), 0, 'company');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/admin/supplierorder_extrafields.php b/htdocs/admin/supplierorder_extrafields.php
index 96e20b92f17..c62d05a3e32 100644
--- a/htdocs/admin/supplierorder_extrafields.php
+++ b/htdocs/admin/supplierorder_extrafields.php
@@ -77,42 +77,7 @@ $head = supplierorder_admin_prepare_head();
dol_fiche_head($head, 'supplierorder', $langs->trans("Suppliers"), 0, 'company');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/admin/supplierorderdet_extrafields.php b/htdocs/admin/supplierorderdet_extrafields.php
index 20066aafab1..2b8364ea297 100644
--- a/htdocs/admin/supplierorderdet_extrafields.php
+++ b/htdocs/admin/supplierorderdet_extrafields.php
@@ -78,42 +78,7 @@ $head = supplierorder_admin_prepare_head();
dol_fiche_head($head, 'supplierorderdet', $langs->trans("Suppliers"), 0, 'company');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/categories/admin/categorie_extrafields.php b/htdocs/categories/admin/categorie_extrafields.php
index 712f60f25cd..c57fae8c311 100644
--- a/htdocs/categories/admin/categorie_extrafields.php
+++ b/htdocs/categories/admin/categorie_extrafields.php
@@ -69,42 +69,7 @@ $head = categoriesadmin_prepare_head();
dol_fiche_head($head, 'attributes_categories', $langs->trans("Categories"), 0, 'category');
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
- // $i++;
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/comm/admin/propal_extrafields.php b/htdocs/comm/admin/propal_extrafields.php
index 2a1a2286db5..304fbc45a3e 100644
--- a/htdocs/comm/admin/propal_extrafields.php
+++ b/htdocs/comm/admin/propal_extrafields.php
@@ -61,10 +61,8 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
$textobject=$langs->transnoentitiesnoconv("Proposals");
-
llxHeader('',$langs->trans("PropalSetup"));
-
$linkback=''.$langs->trans("BackToModuleList").'';
print_fiche_titre($langs->trans("PropalSetup"),$linkback,'setup');
@@ -73,45 +71,7 @@ $head = propal_admin_prepare_head();
dol_fiche_head($head, 'attributes', $langs->trans("Proposals"), 0, 'propal');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Position").' | ';
-print ''.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_pos[$key]." | \n";
- print "".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
- // $i++;
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/comm/admin/propaldet_extrafields.php b/htdocs/comm/admin/propaldet_extrafields.php
index 40dbad4ef94..fed0eb6b98a 100644
--- a/htdocs/comm/admin/propaldet_extrafields.php
+++ b/htdocs/comm/admin/propaldet_extrafields.php
@@ -78,42 +78,7 @@ $head = propal_admin_prepare_head();
dol_fiche_head($head, 'attributeslines', $langs->trans("Proposals"), 0, 'propal');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/compta/facture/admin/facture_cust_extrafields.php b/htdocs/compta/facture/admin/facture_cust_extrafields.php
index 6d60180593a..bc1933f9959 100644
--- a/htdocs/compta/facture/admin/facture_cust_extrafields.php
+++ b/htdocs/compta/facture/admin/facture_cust_extrafields.php
@@ -62,10 +62,8 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
$textobject=strtolower($langs->transnoentitiesnoconv("BillsCustomers"));
-
llxHeader('',$langs->trans("BillsSetup"));
-
$linkback=''.$langs->trans("BackToModuleList").'';
print_fiche_titre($langs->trans("BillsSetup"),$linkback,'setup');
print '
';
@@ -74,44 +72,7 @@ $head = invoice_admin_prepare_head();
dol_fiche_head($head, 'attributes', $langs->trans("Invoices"), 0, 'invoice');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Position").' | ';
-print ''.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_pos[$key]." | \n";
- print "".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
- // $i++;
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
@@ -147,7 +108,7 @@ if ($action == 'create')
if ($action == 'edit' && ! empty($attrname))
{
$langs->load("members");
-
+
print "
";
print_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php
index fd4284a01dd..67efab746bf 100644
--- a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php
+++ b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php
@@ -63,10 +63,8 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
$textobject=strtolower($langs->transnoentitiesnoconv("BillsCustomers"));
-
llxHeader('',$langs->trans("BillsSetup"));
-
$linkback=''.$langs->trans("BackToModuleList").'';
print_fiche_titre($langs->trans("BillsSetup"),$linkback,'setup');
print '
';
@@ -75,44 +73,7 @@ $head = invoice_admin_prepare_head();
dol_fiche_head($head, 'attributeslines', $langs->trans("Invoices"), 0, 'invoice');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Position").' | ';
-print ''.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_pos[$key]." | \n";
- print "".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
- // $i++;
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/contrat/admin/contract_extrafields.php b/htdocs/contrat/admin/contract_extrafields.php
index afb86224151..39e72a9a2f7 100644
--- a/htdocs/contrat/admin/contract_extrafields.php
+++ b/htdocs/contrat/admin/contract_extrafields.php
@@ -62,10 +62,10 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
* View
*/
+$textobject = $langs->transnoentitiesnoconv('Contracts');
llxHeader();
-
$linkback=''.$langs->trans("BackToModuleList").'';
print_fiche_titre($langs->trans("ContractsSetup"),$linkback,'setup');
@@ -74,46 +74,7 @@ $head=contract_admin_prepare_head();
dol_fiche_head($head, 'attributes', $langs->trans("Contracts"), 0, 'contract');
-$textobject = $langs->transnoentitiesnoconv('Contracts');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Position").' | ';
-print ''.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_pos[$key]." | \n";
- print "".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
- // $i++;
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/contrat/admin/contractdet_extrafields.php b/htdocs/contrat/admin/contractdet_extrafields.php
index 21f27cee6d9..839700e8416 100644
--- a/htdocs/contrat/admin/contractdet_extrafields.php
+++ b/htdocs/contrat/admin/contractdet_extrafields.php
@@ -62,10 +62,10 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
* View
*/
+$textobject = $langs->transnoentitiesnoconv('Contracts');
llxHeader();
-
$linkback=''.$langs->trans("BackToModuleList").'';
print_fiche_titre($langs->trans("ContractsSetup"),$linkback,'setup');
@@ -74,46 +74,7 @@ $head=contract_admin_prepare_head();
dol_fiche_head($head, 'attributeslines', $langs->trans("Contracts"), 0, 'contract');
-$textobject = $langs->transnoentitiesnoconv('Contracts');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Position").' | ';
-print ''.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_pos[$key]." | \n";
- print "".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
- // $i++;
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/core/tpl/admin_extrafields.tpl.php b/htdocs/core/tpl/admin_extrafields.tpl.php
deleted file mode 100644
index f8f28da5cc2..00000000000
--- a/htdocs/core/tpl/admin_extrafields.tpl.php
+++ /dev/null
@@ -1,44 +0,0 @@
-
- * Copyright (C) 2012 Regis Houssin
- *
- * 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 .
- */
-?>
-
-
-
-
diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php
index 8f14bff797f..1f61064183b 100644
--- a/htdocs/core/tpl/admin_extrafields_add.tpl.php
+++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php
@@ -112,4 +112,4 @@
-
+
diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php
index 9cf186de39f..13a6486aa4f 100644
--- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php
+++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php
@@ -121,4 +121,4 @@ if(($type == 'select') || ($type == 'sellist') || ($type == 'checkbox') || ($typ
-
+
diff --git a/htdocs/core/tpl/admin_extrafields_view.tpl.php b/htdocs/core/tpl/admin_extrafields_view.tpl.php
new file mode 100644
index 00000000000..a5890e36ea2
--- /dev/null
+++ b/htdocs/core/tpl/admin_extrafields_view.tpl.php
@@ -0,0 +1,72 @@
+
+ * Copyright (C) 2012 Regis Houssin
+ *
+ * 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
+ */
+?>
+
+
+trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
+print '
';
+
+// Load attribute_label
+$extrafields->fetch_name_optionals_label($elementtype);
+
+print "";
+
+print '';
+print '| '.$langs->trans("Position").' | ';
+print ''.$langs->trans("Label").' | ';
+print ''.$langs->trans("AttributeCode").' | ';
+print ''.$langs->trans("Type").' | ';
+print ''.$langs->trans("Size").' | ';
+print ''.$langs->trans("Unique").' | ';
+print ''.$langs->trans("Required").' | ';
+print ''.$langs->trans("AlwaysEditable").' | ';
+print ' | ';
+print "
\n";
+
+$var=True;
+foreach($extrafields->attribute_type as $key => $value)
+{
+ $var=!$var;
+ print "";
+ print "| ".$extrafields->attribute_pos[$key]." | \n";
+ print "".$extrafields->attribute_label[$key]." | \n";
+ print "".$key." | \n";
+ print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
+ print ''.$extrafields->attribute_size[$key]." | \n";
+ print ''.yn($extrafields->attribute_unique[$key])." | \n";
+ print ''.yn($extrafields->attribute_required[$key])." | \n";
+ print ''.yn($extrafields->attribute_alwayseditable[$key])." | \n";
+ print ''.img_edit().'';
+ print " ".img_delete()." | \n";
+ print "
";
+ // $i++;
+}
+
+print "
";
+
+?>
+
diff --git a/htdocs/fichinter/admin/fichinter_extrafields.php b/htdocs/fichinter/admin/fichinter_extrafields.php
index 8cb95a30f63..c5420948ab3 100644
--- a/htdocs/fichinter/admin/fichinter_extrafields.php
+++ b/htdocs/fichinter/admin/fichinter_extrafields.php
@@ -62,60 +62,18 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
* View
*/
+$textobject=$langs->transnoentitiesnoconv("Interventions");
llxHeader();
-$textobject=$langs->transnoentitiesnoconv("Interventions");
-
$linkback=''.$langs->trans("BackToModuleList").'';
print_fiche_titre($langs->trans("InterventionsSetup"),$linkback,'setup');
-
$head=fichinter_admin_prepare_head();
dol_fiche_head($head, 'attributes', $langs->trans("Interventions"), 0, 'intervention');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Position").' | ';
-print ''.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ''.$langs->trans("AlwaysEditable").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_pos[$key]." | \n";
- print "".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.yn($extrafields->attribute_alwayseditable[$key])." | \n"; // TODO This must be generalised into all page to admin extrafield. Mutualize code here is easy and will save a lot of code
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
- // $i++;
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/fichinter/admin/fichinterdet_extrafields.php b/htdocs/fichinter/admin/fichinterdet_extrafields.php
index 7f8b5193631..aaaa497f959 100644
--- a/htdocs/fichinter/admin/fichinterdet_extrafields.php
+++ b/htdocs/fichinter/admin/fichinterdet_extrafields.php
@@ -62,11 +62,10 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
* View
*/
+$textobject=$langs->transnoentitiesnoconv("Interventions");
llxHeader();
-$textobject=$langs->transnoentitiesnoconv("Interventions");
-
$linkback=''.$langs->trans("BackToModuleList").'';
print_fiche_titre($langs->trans("InterventionsSetup"),$linkback,'setup');
@@ -75,45 +74,7 @@ $head=fichinter_admin_prepare_head();
dol_fiche_head($head, 'attributesdet', $langs->trans("Interventions"), 0, 'intervention');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Position").' | ';
-print ''.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_pos[$key]." | \n";
- print "".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
- // $i++;
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/product/admin/product_extrafields.php b/htdocs/product/admin/product_extrafields.php
index ed4ac4d2921..1fc46069241 100644
--- a/htdocs/product/admin/product_extrafields.php
+++ b/htdocs/product/admin/product_extrafields.php
@@ -61,16 +61,16 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
*/
$title = $langs->trans('ProductServiceSetup');
-$tab = $langs->trans("ProductsAndServices");
+$textobject = $langs->trans("ProductsAndServices");
if (empty($conf->produit->enabled))
{
$title = $langs->trans('ServiceSetup');
- $tab = $langs->trans('Services');
+ $textobject = $langs->trans('Services');
}
else if (empty($conf->service->enabled))
{
$title = $langs->trans('ProductSetup');
- $tab = $langs->trans('Products');
+ $textobject = $langs->trans('Products');
}
$help_url='EN:Module Third Parties setup|FR:Paramétrage_du_module_Tiers';
@@ -83,45 +83,9 @@ print_fiche_titre($title,$linkback,'setup');
$head = product_admin_prepare_head();
-dol_fiche_head($head, 'attributes', $tab, 0, 'product');
+dol_fiche_head($head, 'attributes', $textobject, 0, 'product');
-
-print $langs->trans('DefineHereComplementaryAttributes', $tab).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
- // $i++;
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/projet/admin/project_extrafields.php b/htdocs/projet/admin/project_extrafields.php
index f4dde012d96..8c8b8af0971 100644
--- a/htdocs/projet/admin/project_extrafields.php
+++ b/htdocs/projet/admin/project_extrafields.php
@@ -59,8 +59,9 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
* View
*/
-llxHeader("",$langs->trans("ProjectsSetup"));
+$textobject=$langs->transnoentitiesnoconv("Project");
+llxHeader("",$langs->trans("ProjectsSetup"));
$linkback=''.$langs->trans("BackToModuleList").'';
print_fiche_titre($langs->trans("ProjectsSetup"),$linkback,'setup');
@@ -70,43 +71,7 @@ $head = project_admin_prepare_head();
dol_fiche_head($head, 'attributes', $langs->trans("Projects"), 0, 'project');
-$textobject=$langs->transnoentitiesnoconv("Project");
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/projet/admin/project_task_extrafields.php b/htdocs/projet/admin/project_task_extrafields.php
index 902b86df3b7..33101bcee6b 100644
--- a/htdocs/projet/admin/project_task_extrafields.php
+++ b/htdocs/projet/admin/project_task_extrafields.php
@@ -59,8 +59,9 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
* View
*/
-llxHeader("",$langs->trans("ProjectsSetup"));
+$textobject=$langs->transnoentitiesnoconv("Project");
+llxHeader("",$langs->trans("ProjectsSetup"));
$linkback=''.$langs->trans("BackToModuleList").'';
print_fiche_titre($langs->trans("ProjectsSetup"),$linkback,'setup');
@@ -68,43 +69,8 @@ print_fiche_titre($langs->trans("ProjectsSetup"),$linkback,'setup');
$head = project_admin_prepare_head();
dol_fiche_head($head, 'attributes_task', $langs->trans("Projects"), 0, 'project');
-$textobject=$langs->transnoentitiesnoconv("Project");
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/societe/admin/contact_extrafields.php b/htdocs/societe/admin/contact_extrafields.php
index a0b72c80aea..f82cb01ac51 100644
--- a/htdocs/societe/admin/contact_extrafields.php
+++ b/htdocs/societe/admin/contact_extrafields.php
@@ -72,43 +72,7 @@ $head = societe_admin_prepare_head();
dol_fiche_head($head, 'attributes_contacts', $langs->trans("ThirdParties"), 0, 'company');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
- // $i++;
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/societe/admin/societe_extrafields.php b/htdocs/societe/admin/societe_extrafields.php
index b6485e0d489..928cac01f7c 100644
--- a/htdocs/societe/admin/societe_extrafields.php
+++ b/htdocs/societe/admin/societe_extrafields.php
@@ -73,45 +73,7 @@ $head = societe_admin_prepare_head(null);
dol_fiche_head($head, 'attributes', $langs->trans("ThirdParties"), 0, 'company');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Position").' | ';
-print ''.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_pos[$key]." | \n";
- print "".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
- // $i++;
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/user/admin/group_extrafields.php b/htdocs/user/admin/group_extrafields.php
index dbb9e863af4..1282c585018 100644
--- a/htdocs/user/admin/group_extrafields.php
+++ b/htdocs/user/admin/group_extrafields.php
@@ -73,43 +73,7 @@ $head = user_admin_prepare_head();
dol_fiche_head($head, 'attributes_group', $langs->trans("Group"), 0, 'user');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
- // $i++;
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();
diff --git a/htdocs/user/admin/user_extrafields.php b/htdocs/user/admin/user_extrafields.php
index 7caa42b08ea..7ff143f2235 100644
--- a/htdocs/user/admin/user_extrafields.php
+++ b/htdocs/user/admin/user_extrafields.php
@@ -72,43 +72,7 @@ $head = user_admin_prepare_head();
dol_fiche_head($head, 'attributes', $langs->trans("User"), 0, 'user');
-
-print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n";
-print '
';
-
-// Load attribute_label
-$extrafields->fetch_name_optionals_label($elementtype);
-
-print "";
-
-print '';
-print '| '.$langs->trans("Label").' | ';
-print ''.$langs->trans("AttributeCode").' | ';
-print ''.$langs->trans("Type").' | ';
-print ''.$langs->trans("Size").' | ';
-print ''.$langs->trans("Unique").' | ';
-print ''.$langs->trans("Required").' | ';
-print ' | ';
-print "
\n";
-
-$var=True;
-foreach($extrafields->attribute_type as $key => $value)
-{
- $var=!$var;
- print "";
- print "| ".$extrafields->attribute_label[$key]." | \n";
- print "".$key." | \n";
- print "".$type2label[$extrafields->attribute_type[$key]]." | \n";
- print ''.$extrafields->attribute_size[$key]." | \n";
- print ''.yn($extrafields->attribute_unique[$key])." | \n";
- print ''.yn($extrafields->attribute_required[$key])." | \n";
- print ''.img_edit().'';
- print " ".img_delete()." | \n";
- print "
";
- // $i++;
-}
-
-print "
";
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
dol_fiche_end();