diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php
index b6255221fa3..762e0f10f78 100644
--- a/htdocs/categories/class/categorie.class.php
+++ b/htdocs/categories/class/categorie.class.php
@@ -64,9 +64,7 @@ class Categorie extends CommonObject
/**
- * @var array ID mapping from type string
- *
- * @note This array should be removed in future, once previous constants are moved to the string value. Deprecated
+ * @var array Table of mapping between type string and ID used for field 'type' in table llx_categories
*/
protected $MAP_ID = array(
'product' => 0,
@@ -79,7 +77,8 @@ class Categorie extends CommonObject
'user' => 7,
'bank_line' => 8,
'warehouse' => 9,
- 'actioncomm' => 10
+ 'actioncomm' => 10,
+ 'website_page' => 11
);
/**
@@ -1075,6 +1074,10 @@ class Categorie extends CommonObject
global $conf, $langs;
if (!is_numeric($type)) $type = $this->MAP_ID[$type];
+ if (is_null($type)) {
+ $this->error = 'BadValueForParameterType';
+ return -1;
+ }
if (is_string($markafterid))
{
diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php
index 026ff2f24ac..ccdd8be58b9 100644
--- a/htdocs/categories/index.php
+++ b/htdocs/categories/index.php
@@ -54,7 +54,10 @@ $typetext = $type;
if ($type == Categorie::TYPE_ACCOUNT) $title = $langs->trans('AccountsCategoriesArea');
elseif ($type == Categorie::TYPE_WAREHOUSE) $title = $langs->trans('StocksCategoriesArea');
elseif ($type == Categorie::TYPE_ACTIONCOMM) $title = $langs->trans('ActionCommCategoriesArea');
-else $title = $langs->trans(ucfirst($type).'sCategoriesArea');
+elseif ($type == Categorie::TYPE_WEBSITE_PAGE) $title = $langs->trans('WebsitePagesCategoriesArea');
+else {
+ $title = $langs->trans(ucfirst($type).'sCategoriesArea');
+}
$arrayofjs = array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
$arrayofcss = array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
@@ -69,8 +72,6 @@ if (!empty($user->rights->categorie->creer)) {
print load_fiche_titre($title, $newcardbutton, 'object_category');
-//print '
';
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 8ab6cb43be9..4dd7588cec1 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -3032,7 +3032,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench',
'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp',
'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top',
- 'home', 'companies', 'products', 'commercial', 'invoicing', 'preview', 'project', 'projectpub', 'supplier_invoice', 'hrm', 'members', 'ticket', 'generic',
+ 'home', 'companies', 'products', 'commercial', 'invoicing', 'pencil-ruler', 'preview', 'project', 'projectpub', 'supplier_invoice', 'hrm', 'members', 'ticket', 'generic',
'error', 'warning', 'supplier_proposal', 'supplier_order', 'supplier_invoice',
'title_setup', 'title_accountancy', 'title_bank', 'title_hrm', 'title_agenda'
)
diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php
index 5043e2c2d28..a4e6134060d 100644
--- a/htdocs/core/modules/modFacture.class.php
+++ b/htdocs/core/modules/modFacture.class.php
@@ -212,8 +212,10 @@ class modFacture extends DolibarrModules
$this->export_fields_array[$r] = array(
's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.code_client'=>'CustomerCode', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 'cd.nom'=>'State',
's.phone'=>'Phone',
- 's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 's.code_compta'=>'CustomerAccountancyCode',
- 's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra',
+ 's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4',
+ 's.code_compta'=>'CustomerAccountancyCode',
+ 's.code_compta_fournisseur'=>'SupplierAccountancyCode',
+ 's.tva_intra'=>'VATIntra',
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_client'=>'RefCustomer',
'f.type'=>"Type", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>"DateDue", 'f.total'=>"TotalHT",
'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.localtax1'=>'LT1', 'f.localtax2'=>'LT2', 'f.paye'=>"InvoicePaidCompletely", 'f.fk_statut'=>'InvoiceStatus', 'f.close_code'=>'EarlyClosingReason', 'f.close_note'=>'EarlyClosingComment',
diff --git a/htdocs/langs/en_US/categories.lang b/htdocs/langs/en_US/categories.lang
index 30bace0574c..9bb71984ecf 100644
--- a/htdocs/langs/en_US/categories.lang
+++ b/htdocs/langs/en_US/categories.lang
@@ -86,4 +86,5 @@ ByDefaultInList=By default in list
ChooseCategory=Choose category
StocksCategoriesArea=Warehouses Categories Area
ActionCommCategoriesArea=Events Categories Area
+WebsitePagesCategoriesArea=Page-Container Categories Area
UseOrOperatorForCategories=Use or operator for categories
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index 6e559c3e7fb..9bb3589b936 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -798,7 +798,7 @@ class Product extends CommonObject
}
/**
- * Update a record into database.
+ * Update a record into database.
* If batch flag is set to on, we create records into llx_product_batch
*
* @param int $id Id of product
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index 2d30ed9c766..14bdd8c529a 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -665,10 +665,10 @@ body[class*="colorblind-"] .text-success{
color :
}
-.editfielda span.fa-pencil-alt, .editfielda span.fa-trash, .editfieldlang {
+.editfielda span.fa-pencil-alt, .editfielda span.fa-pencil-ruler, .editfielda span.fa-trash, .editfieldlang {
color: #ccc !important;
}
-.editfielda span.fa-pencil-alt:hover, .editfielda span.fa-trash:hover, .editfieldlang:hover {
+.editfielda span.fa-pencil-alt:hover, .editfielda span.fa-pencil-ruler:hover, .editfielda span.fa-trash:hover, .editfieldlang:hover {
color: var(--colortexttitle) !important;
}
.fawidth30 {
diff --git a/htdocs/website/index.php b/htdocs/website/index.php
index 1caeb326854..a089e08282e 100644
--- a/htdocs/website/index.php
+++ b/htdocs/website/index.php
@@ -2230,6 +2230,7 @@ if (!GETPOST('hide_websitemenu'))
*/
print '
ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("ReplaceWebsiteContent")).'">';
+ print '
';
if (! empty($conf->global->WEBSITE_ADD_REGENERATE_BUTTON)) {
print '
ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("RegenerateWebsiteContent")).'">';
}
@@ -3572,6 +3573,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction =
print getTitleFieldOfList("Page", 0, $_SERVER['PHP_SELF'], 'pageurl', '', $param, '', $sortfield, $sortorder, '')."\n";
//print getTitleFieldOfList("Description", 0, $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, '')."\n";
print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']);
+ print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']);
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
print '';
@@ -3594,6 +3596,24 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction =
print '
'.$answerrecord->description.'';
print '';
+ // Edit properties
+ print '
';
+ $param = '?action=replacesiteconfirm';
+ $param .= '&websiteid='.$website->id;
+ $param .= '&optioncontent='.GETPOST('optioncontent');
+ $param .= '&optionmeta='.GETPOST('optionmeta');
+ $param .= '&optionsitefiles='.GETPOST('optionsitefiles');
+ $param .= '&searchstring='.$searchkey;
+ $disabled = '';
+ $urltoedithtmlsource = $_SERVER["PHP_SELF"].'?action=editmeta&websiteid='.$website->id.'&pageid='.$answerrecord->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].$param);
+ if (empty($user->rights->website->write)) {
+ $disabled = ' disabled';
+ $urltoedithtmlsource = '';
+ }
+ print ''.img_picto($langs->trans("EditPageMeta"), 'pencil-ruler').'';
+ print ' | ';
+
+ // Edit HTML source
print '
';
$param = '?action=replacesiteconfirm';
$param .= '&websiteid='.$website->id;
|