mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
WIP Addapage to edit all categories.
This commit is contained in:
@@ -1870,7 +1870,7 @@ function dol_sanitizeKeyCode($str)
|
||||
/**
|
||||
* Clean a string from all accent characters to be used as ref, login or by dol_sanitizeFileName
|
||||
*
|
||||
* @param string $str String to clean
|
||||
* @param string $str String to clean. Must be an ascii or utf8 string without any htmlentities.
|
||||
* @return string Cleaned string
|
||||
*
|
||||
* @see dol_sanitizeFilename(), dol_string_nospecial()
|
||||
@@ -13711,6 +13711,11 @@ function getElementProperties($elementType)
|
||||
$module = 'bank'; // We need $conf->bank->dir_output and not $conf->banque->dir_output
|
||||
$classfile = 'account';
|
||||
$classname = 'Account';
|
||||
} elseif ($elementType == 'bank_line') {
|
||||
$classpath = 'compta/bank/class';
|
||||
$module = 'bank'; // We need $conf->bank->dir_output and not $conf->banque->dir_output
|
||||
$classfile = 'account';
|
||||
$classname = 'AccountLine';
|
||||
} elseif ($elementType == 'category') {
|
||||
$classpath = 'categories/class';
|
||||
$module = 'categorie';
|
||||
@@ -13730,7 +13735,7 @@ function getElementProperties($elementType)
|
||||
$classpath = 'product/inventory/class';
|
||||
$table_element = 'inventorydet';
|
||||
$parent_element = 'inventory';
|
||||
} elseif ($elementType == 'stock' || $elementType == 'entrepot') {
|
||||
} elseif ($elementType == 'stock' || $elementType == 'entrepot' || $elementType == 'warehouse') {
|
||||
$module = 'stock';
|
||||
$classpath = 'product/stock/class';
|
||||
$classfile = 'entrepot';
|
||||
@@ -13884,7 +13889,7 @@ function getElementProperties($elementType)
|
||||
$classpath = 'opensurvey/class';
|
||||
$module = 'opensurvey';
|
||||
$subelement = 'opensurveysondage';
|
||||
} elseif ($elementType == 'order_supplier' || $elementType == 'commande_fournisseur' || $elementType == 'commandefournisseur') {
|
||||
} elseif ($elementType == 'order_supplier' || $elementType == 'supplier_order' ||$elementType == 'commande_fournisseur' || $elementType == 'commandefournisseur') {
|
||||
$classpath = 'fourn/class';
|
||||
$module = 'fournisseur';
|
||||
$classfile = 'fournisseur.commande';
|
||||
@@ -13901,7 +13906,7 @@ function getElementProperties($elementType)
|
||||
$classname = 'CommandeFournisseurLigne';
|
||||
$table_element = 'commande_fournisseurdet';
|
||||
$parent_element = 'commande_fournisseur';
|
||||
} elseif ($elementType == 'invoice_supplier') {
|
||||
} elseif ($elementType == 'invoice_supplier' || $elementType == 'supplier_invoice') {
|
||||
$classpath = 'fourn/class';
|
||||
$module = 'fournisseur';
|
||||
$classfile = 'fournisseur.facture';
|
||||
@@ -13943,7 +13948,7 @@ function getElementProperties($elementType)
|
||||
$classfile = 'societeaccount';
|
||||
$classname = 'SocieteAccount';
|
||||
$module = 'societe';
|
||||
} elseif ($elementType == 'websitepage') {
|
||||
} elseif ($elementType == 'websitepage' || $elementType == 'website_page') {
|
||||
$classpath = 'website/class';
|
||||
$classfile = 'websitepage';
|
||||
$classname = 'Websitepage';
|
||||
@@ -13994,15 +13999,30 @@ function getElementProperties($elementType)
|
||||
$classname = 'Ecmfiles';
|
||||
$table_element = 'ecmfiles';
|
||||
$subelement = '';
|
||||
} elseif ($elementType == 'knowledgerecord') {
|
||||
} elseif ($elementType == 'knowledgerecord' || $elementType == 'knowledgemanagement') {
|
||||
$module = '';
|
||||
$classpath = 'knowledgemanagement/class';
|
||||
$classfile = 'knowledgerecord';
|
||||
$classname = 'KnowledgeRecord';
|
||||
$table_element = 'knowledgemanagement_knowledgerecord';
|
||||
$subelement = '';
|
||||
} elseif ($elementType == 'customer') {
|
||||
$module = 'thirdparty';
|
||||
$classpath = 'societe/class';
|
||||
$classfile = 'client';
|
||||
$classname = 'Client';
|
||||
$table_element = 'societe';
|
||||
$subelement = '';
|
||||
} elseif ($elementType == 'fournisseur' || $elementType == 'supplier') {
|
||||
$module = 'thirdparty';
|
||||
$classpath = 'fourn/class';
|
||||
$classfile = 'fournisseur';
|
||||
$classname = 'Fournisseur';
|
||||
$table_element = 'societe';
|
||||
$subelement = '';
|
||||
}
|
||||
|
||||
|
||||
if (empty($classfile)) {
|
||||
$classfile = strtolower($subelement);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user