diff --git a/ChangeLog b/ChangeLog index 7e8ce042bf3..c4bc005a94d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,7 @@ NEW: Accountancy - Add mode intra & export for product or service bought NEW: Accountancy - Add possibility to manage a short alternative label for account - Use to simplify accountancy NEW: Accountancy - General ledger - Add an option to search not reconciled lines NEW: Add accountancy code of thirdparty in contact and supplier export +NEW: support webp image format NEW: add a link to notes in members list NEW: add a parameter to group same products in TakePOS NEW: add a parameter to sort product by label in TakePOS diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index f33a3ea6f93..d7761557f22 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -495,7 +495,9 @@ if (!empty($mysoc->logo_mini)) { } print '
'.img_delete($langs->trans("Delete"), '', 'marginleftonly').'
'; } else { + print '
'; print ''; + print '
'; } print ''; print ''; @@ -513,7 +515,9 @@ if (!empty($mysoc->logo_squarred_mini)) { } print '
'.img_delete($langs->trans("Delete"), '', 'marginleftonly').'
'; } else { + print '
'; print ''; + print '
'; } print ''; print ''; diff --git a/htdocs/barcode/codeinit.php b/htdocs/barcode/codeinit.php index d2afa5e6871..1bfb1836a39 100644 --- a/htdocs/barcode/codeinit.php +++ b/htdocs/barcode/codeinit.php @@ -211,7 +211,7 @@ if ($conf->societe->enabled) { $nbno = $nbtotal = 0; - print load_fiche_titre($langs->trans("BarcodeInitForThirdparties"), '', 'title_companies'); + print load_fiche_titre($langs->trans("BarcodeInitForThirdparties"), '', 'company'); print '
'."\n"; $sql = "SELECT count(rowid) as nb FROM ".MAIN_DB_PREFIX."societe where barcode IS NULL or barcode = ''"; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 21f558219eb..795602cd95d 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1160,7 +1160,7 @@ if (empty($reshook)) elseif ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate) { - $idwarehouse = GETPOST('idwarehouse'); + $idwarehouse = GETPOST('idwarehouse', 'int'); $qualified_for_stock_change = 0; if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) @@ -1269,7 +1269,7 @@ if (empty($reshook)) elseif ($action == 'confirm_cancel' && $confirm == 'yes' && $usercanvalidate) { - $idwarehouse = GETPOST('idwarehouse'); + $idwarehouse = GETPOST('idwarehouse', 'int'); $qualified_for_stock_change = 0; if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index c067ee2bc56..40e6849d494 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -913,9 +913,10 @@ if (!$error && $massaction == 'cancelorders') setEventMessages($langs->trans("ErrorObjectMustHaveStatusValidToBeCanceled", $cmd->ref), null, 'errors'); $error++; break; - } - else + } else { + // TODO We do not provide warehouse so no stock change here for the moment. $result = $cmd->cancel(); + } if ($result < 0) { @@ -1028,14 +1029,18 @@ if (!$error && $massaction == "builddoc" && $permissiontoread && !GETPOST('butto $input_files .= ' '.escapeshellarg($f); } - $cmd = 'pdftk '.escapeshellarg($input_files).' cat output '.escapeshellarg($file); + $cmd = 'pdftk ' . $input_files . ' cat output '.escapeshellarg($file); exec($cmd); - if (!empty($conf->global->MAIN_UMASK)) - @chmod($file, octdec($conf->global->MAIN_UMASK)); - - $langs->load("exports"); - setEventMessages($langs->trans('FileSuccessfullyBuilt', $filename.'_'.dol_print_date($now, 'dayhourlog')), null, 'mesgs'); + // check if pdftk is installed + if (file_exists($file)) { + if (!empty($conf->global->MAIN_UMASK)) + @chmod($file, octdec($conf->global->MAIN_UMASK)); + $langs->load("exports"); + setEventMessages($langs->trans('FileSuccessfullyBuilt', $filename.'_'.dol_print_date($now, 'dayhourlog')), null, 'mesgs'); + } else { + setEventMessages($langs->trans('ErrorPDFTkOutputFileNotFound'), null, 'errors'); + } } else { diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index 83227b00e51..32d4f8d3bfa 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -61,15 +61,16 @@ if (!isset($mode) || $mode != 'noajax') // For ajax call $upload_dir = dirname(str_replace("../", "/", $rootdirfordoc.'/'.$file)); - $ecmdir = new EcmDirectory($db); - $result = $ecmdir->fetch($section); - if (!$result > 0) - { - //dol_print_error($db,$ecmdir->error); - //exit; - } -} -else // For no ajax call + $ecmdir = new EcmDirectory($db); + if ($section > 0) { + $result = $ecmdir->fetch($section); + if (!$result > 0) + { + //dol_print_error($db,$ecmdir->error); + //exit; + } + } +} else // For no ajax call { $rootdirfordoc = $conf->ecm->dir_output; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index fd5e70c3669..fd6a11998ed 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6316,7 +6316,7 @@ abstract class CommonObject // Several field into label (eq table:code|libelle:rowid) $notrans = false; $fields_label = explode('|', $InfoFieldList[1]); - if (is_array($fields_label)) + if (count($fields_label) > 1) { $notrans = true; foreach ($fields_label as $field_toshow) @@ -6488,7 +6488,7 @@ abstract class CommonObject $notrans = false; // Several field into label (eq table:code|libelle:rowid) $fields_label = explode('|', $InfoFieldList[1]); - if (is_array($fields_label)) { + if (count($fields_label) > 1) { $notrans = true; foreach ($fields_label as $field_toshow) { $labeltoshow .= $obj->$field_toshow.' '; @@ -7915,6 +7915,10 @@ abstract class CommonObject { if (is_null($value)) return 'NULL'; elseif (preg_match('/^(int|double|real|price)/i', $fieldsentry['type'])) return $this->db->escape("$value"); + elseif ($fieldsentry['type'] == 'boolean') { + if ($value) return 'true'; + else return 'false'; + } else return "'".$this->db->escape($value)."'"; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 7496de72ec2..9540c9eef84 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2523,6 +2523,8 @@ class Form $outdurationvalue = $outtype == Product::TYPE_SERVICE ?substr($objp->duration, 0, dol_strlen($objp->duration) - 1) : ''; $outdurationunit = $outtype == Product::TYPE_SERVICE ?substr($objp->duration, -1) : ''; + if ($outorigin && !empty($conf->global->PRODUCT_SHOW_ORIGIN_IN_COMBO)) require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; + // Units $outvalUnits = ''; if (!empty($conf->global->PRODUCT_USE_UNITS)) { @@ -4192,18 +4194,18 @@ class Form * print '});'."\n"; * print ''."\n"; * - * @param string $page Url of page to call if confirmation is OK. Can contains parameters (param 'action' and 'confirm' will be reformated) - * @param string $title Title - * @param string $question Question - * @param string $action Action - * @param array $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , )) - * type can be 'hidden', 'text', 'password', 'checkbox', 'radio', 'date', 'morecss', ... - * @param string $selectedchoice '' or 'no', or 'yes' or '1' or '0' - * @param int|string $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx - * @param int $height Force height of box (0 = auto) - * @param int $width Force width of box ('999' or '90%'). Ignored and forced to 90% on smartphones. - * @param int $disableformtag 1=Disable form tag. Can be used if we are already inside a
section. - * @return string HTML ajax code if a confirm ajax popup is required, Pure HTML code if it's an html form + * @param string $page Url of page to call if confirmation is OK. Can contains parameters (param 'action' and 'confirm' will be reformated) + * @param string $title Title + * @param string $question Question + * @param string $action Action + * @param array|string $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , )) + * type can be 'hidden', 'text', 'password', 'checkbox', 'radio', 'date', 'morecss', ... + * @param string $selectedchoice '' or 'no', or 'yes' or '1' or '0' + * @param int|string $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx + * @param int $height Force height of box (0 = auto) + * @param int $width Force width of box ('999' or '90%'). Ignored and forced to 90% on smartphones. + * @param int $disableformtag 1=Disable form tag. Can be used if we are already inside a section. + * @return string HTML ajax code if a confirm ajax popup is required, Pure HTML code if it's an html form */ public function formconfirm($page, $title, $question, $action, $formquestion = '', $selectedchoice = '', $useajax = 0, $height = 0, $width = 500, $disableformtag = 0) { @@ -4357,7 +4359,7 @@ class Form } // Show JQuery confirm box. $formconfirm .= ''; print '
'; diff --git a/htdocs/takepos/genimg/qr.php b/htdocs/takepos/genimg/qr.php index 3aca3b22ebf..452eb7023e2 100644 --- a/htdocs/takepos/genimg/qr.php +++ b/htdocs/takepos/genimg/qr.php @@ -27,10 +27,15 @@ if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); require '../../main.inc.php'; // Load $user and permissions require '../../core/modules/barcode/doc/tcpdfbarcode.modules.php'; -$key = GETPOST('key'); - $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file -$module = new modTcpdfbarcode(); -$result = $module->buildBarCode($urlwithroot."/takepos/public/auto_order.php?key=".dol_encode($key), 'QRCODE', 'Y'); +if (GETPOSTISSET("key")) { + $key = GETPOST('key'); + $module = new modTcpdfbarcode(); + $result = $module->buildBarCode($urlwithroot."/takepos/public/auto_order.php?key=".$key, 'QRCODE', 'Y'); +} +else { + $module = new modTcpdfbarcode(); + $result = $module->buildBarCode($urlwithroot."/takepos/public/menu.php", 'QRCODE', 'Y'); +} diff --git a/htdocs/takepos/public/css/style.css b/htdocs/takepos/public/css/style.css new file mode 100644 index 00000000000..418945cf5f5 --- /dev/null +++ b/htdocs/takepos/public/css/style.css @@ -0,0 +1,144 @@ +/* -- footer -- */ +html { + position: relative; + min-height: 100%; +} +body { + margin-bottom: 60px; + font-family: 'Khand', sans-serif; +} +.footer { + position: absolute; + bottom: 0; + width: 100%; + height: 60px; + background-color: #f5f5f5; +} +.container .text-muted { + margin: 20px 0; +} +.footer > .container { + padding-right: 15px; + padding-left: 15px; +} +/* -- -- */ +h3 { + display:inline-block; + font-size: 32px; + line-height: 36px; + position: relative; + margin-top:28px; + margin-bottom:15px; +} +h3:before{ + left: -40px; + height: 0; + height:1px; +} +h3:before, h3:after { + content: ""; + position: absolute; + bottom: 10px; + height: 1px; + width: 40px; + margin: 0 -15px; + background-color: #533834; +} +h3:after{ + right: -40px; +} +h5 { + font-size: 16px; + line-height: 22px; + margin: 0 0 15px; + font-weight: 400; +} +.item { + position: relative; + overflow: hidden; + margin-bottom:20px; +} +.item h4, .price { + z-index: 0; + position: relative; + background-color: #fff; + right: 0; + position: absolute; +} +.item .price { + padding-left: 8px; +} +.item h4, .item p { + display: block; + clear: both; + color: #533834; +} +.item p { + clear: both; + color: #938372; + margin-left:10px; +} +.dots { + background-image: linear-gradient(to right,rgba(56,47,47,.5) 33%,rgba(0,0,0,0) 0%); + background-position: bottom; + background-size: 3px 1px; + background-repeat: repeat-x; + height: 1px; + width: 100%; + position: absolute; + top: 22px; +} +/* Dots in IE */ +@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { + .dots { + background: transparent url('/img/dot.gif') repeat-x bottom left; + } +} +.badge { + display: inline-block; + padding: 0 10px; + background: #d2c82a; + font-size: 12px; + font-weight: 300; + line-height: 26px; + color: #fff; + text-align: center; + vertical-align: middle; + text-transform: uppercase; + border: 1px solid rgba(0,0,0,.05); + letter-spacing: 1px; + border-radius: 3px; + margin: -5px 5px 0 0; +} +.note { + padding: 0 6px; + min-width: 23px; + background: rgba(0,0,0,0); + border: 1px solid #382f2f; + color: #382f2f; + box-sizing: border-box; + border-radius: 500px; + line-height: 21px; +} +.veggie { + color:#82b440; + border-color:#82b440; +} +.spicy { + color:#ec4e00; + border-color:#ec4e00; +} +.price { + position: absolute; + font-size:22px; + font-weight:400; + right: 0; +} +.item h4 { + display: inline-block; + padding-right: 8px; + max-width: 80%; + text-transform: capitalize; + margin-bottom:4px; + position: relative; +} \ No newline at end of file diff --git a/htdocs/takepos/public/js/script.js b/htdocs/takepos/public/js/script.js new file mode 100644 index 00000000000..c3c8817354f --- /dev/null +++ b/htdocs/takepos/public/js/script.js @@ -0,0 +1 @@ +$(document).foundation(); \ No newline at end of file diff --git a/htdocs/takepos/public/menu.php b/htdocs/takepos/public/menu.php new file mode 100644 index 00000000000..c051ae4d673 --- /dev/null +++ b/htdocs/takepos/public/menu.php @@ -0,0 +1,117 @@ + + * + * 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 . + */ + +/** + * \file htdocs/takepos/public/menu.php + * \ingroup takepos + * \brief Public menu for customers + */ + +if (!defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip + +require '../../main.inc.php'; + +require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + +if (!$conf->global->TAKEPOS_QR_MENU) accessforbidden(); // If Restaurant Menu is disabled never allow NO LOGIN access +?> + + + + + <?php echo $mysoc->name; ?> + + + + + + + +
+ +
+
+
+

name; ?>

+
+
+ + + + + + + diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 19c513dff28..0ec69d4934a 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -667,10 +667,12 @@ 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, .editfielda span.fa-crop, +.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, .editfielda span.fa-crop:hover, +.editfieldlang:hover { color: var(--colortexttitle) !important; } .fawidth30 { @@ -3989,15 +3991,20 @@ div.titre { padding-top: 5px; padding-bottom: 5px; } -.secondary, div.titre { +div.fiche > table.table-fiche-title:first-of-type div { + color: var(--colortexttitlenotab); + /* font-weight: 600; */ +} +div.titre { + color: var(--colortexttitlenotab); +} + +.secondary { color: var(--colortexttitlenotab); } .tertiary { color: var(--colortexttitlenotab2); } -table.table-fiche-title:first-of-type div { - color: var(--colortexttitlenotab); -} table.table-fiche-title .col-title div.titre{ line-height: 40px; diff --git a/htdocs/theme/eldy/theme_vars.inc.php b/htdocs/theme/eldy/theme_vars.inc.php index 0677c8e4918..e76f0bcf56c 100644 --- a/htdocs/theme/eldy/theme_vars.inc.php +++ b/htdocs/theme/eldy/theme_vars.inc.php @@ -67,8 +67,8 @@ $colorbacklinepairhover = '230,237,244'; // line hover $colorbacklinepairchecked = '230,237,244'; // line checked $colorbacklinebreak = '248,247,244'; // line break $colorbackbody = '255,255,255'; -$colortexttitlenotab = '0,123,140'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,113,120, violet: 0,50,120 -$colortexttitlenotab2 = '100,0,100'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,113,120, violet: 0,50,120 +$colortexttitlenotab = '0,123,140'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,123,140, violet: 0,50,120 +$colortexttitlenotab2 = '100,0,100'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,123,140, violet: 0,50,120 $colortexttitle = '0,0,0'; $colortexttitlelink = '10, 20, 100'; $colortext = '0,0,0'; diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 09faa79d19a..7153a7bc3d0 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -285,6 +285,8 @@ if ($action == 'replacesiteconfirm') { $listofpages = getPagesFromSearchCriterias('', $algo, $searchkey, 1000, $sortfield, $sortorder); } +$usercanedit = $user->rights->website->write; +$permissiontodelete = $user->rights->website->delete; /* @@ -319,6 +321,10 @@ if (GETPOST('refreshsite', 'alpha') || GETPOST('refreshsite.x', 'alpha') || GETP } if (GETPOST('refreshpage', 'alpha') && !in_array($action, array('updatecss'))) $action = 'preview'; +if ($cancel && $action == 'renamefile') { + $cancel = ''; +} + // Cancel if ($cancel) { @@ -337,7 +343,9 @@ if ($sortorder) $backtopage .= '&sortorder='.$sortorder; include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; $backtopage = $savbacktopage; -if ($action == 'renamefile') $action = 'file_manager'; // After actions_linkedfiles, if action were renamefile, we set it to 'file_manager' +if ($action == 'renamefile') { // Must be after include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; If action were renamefile, we set it to 'file_manager' + $action = 'file_manager'; +} if ($action == 'seteditinline') { @@ -367,9 +375,10 @@ if ($action == 'unsetshowsubcontainers') exit; } -if (($action == 'replacesite' || $action == 'replacesiteconfirm') && !$searchkey) +if ($massaction == 'replace' && GETPOST('confirmmassaction', 'alpha') && !$searchkey) { $action = 'replacesite'; + $massaction = ''; } // Replacement of string into pages @@ -1105,9 +1114,8 @@ if ($action == 'confirm_deletesite' && $confirm == 'yes') } } -// Delete page -if ($action == 'delete') -{ +// Delete page (from website page menu) +if (GETPOSTISSET('pageid') && $action == 'delete' && $permissiontodelete) { $error = 0; $db->begin(); @@ -1141,6 +1149,62 @@ if ($action == 'delete') dol_print_error($db); } } +// Delete page (from menu search) +if (! GETPOSTISSET('pageid')) { + $objectclass = 'WebsitePage'; + + // Add part of code from actions_massactions.inc.php + // Delete record from mass action (massaction = 'delete' for direct delete, action/confirm='delete'/'yes' with a confirmation step before) + if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permissiontodelete) + { + $db->begin(); + + $objecttmp = new $objectclass($db); + $nbok = 0; + foreach ($toselect as $toselectid) + { + $result = $objecttmp->fetch($toselectid); + if ($result > 0) + { + $result = $objecttmp->delete($user); + + if ($result <= 0) + { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } else $nbok++; + } else { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + } + + if (!$error) + { + if ($nbok > 1) setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs'); + else setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs'); + $db->commit(); + } else { + $db->rollback(); + } + //var_dump($listofobjectthirdparties);exit; + } + + if ($action == 'delete') { + $action = 'replacesiteconfirm'; + + $containertype = GETPOST('optioncontainertype', 'aZ09') != '-1' ? GETPOST('optioncontainertype', 'aZ09') : ''; + $langcode = GETPOST('optionlanguage', 'aZ09'); + $otherfilters = array(); + if (GETPOST('optioncategory', 'int') > 0) { + $otherfilters['category'] = GETPOST('optioncategory', 'int'); + } + + $listofpages = getPagesFromSearchCriterias($containertype, $algo, $searchkey, 1000, $sortfield, $sortorder, $langcode, $otherfilters); + } +} // Update css Update site properties if ($action == 'updatecss') @@ -2360,8 +2424,7 @@ if (!GETPOST('hide_websitemenu')) // Toolbar for pages - - if ($websitekey && $websitekey != '-1' && !in_array($action, array('editcss', 'editmenu', 'importsite'))) + if ($websitekey && $websitekey != '-1' && !in_array($action, array('editcss', 'editmenu', 'importsite', 'file_manager', 'replacesite', 'replacesiteconfirm')) && !$file_manager) { print ''; // Close current websitebar to open a new one @@ -2915,7 +2978,10 @@ if ($action == 'editcss') // JS file print ''; - print $langs->trans('WEBSITE_JS_INLINE'); + $textwithhelp = $langs->trans('WEBSITE_JS_INLINE'); + $htmlhelp2 = $langs->trans("LinkAndScriptsHereAreNotLoadedInEditor").'
'; + print $form->textwithpicto($textwithhelp, $htmlhelp2, 1, 'warning', '', 0, 2, 'htmljstooltip2'); + print ''; $doleditor = new DolEditor('WEBSITE_JS_INLINE', $jscontent, '', '220', 'ace', 'In', true, false, 'ace', 0, '100%', ''); @@ -3210,6 +3276,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') $pageauthorid = $objectpage->fk_user_creat; $pageusermodifid = $objectpage->fk_user_modif; $pageauthoralias = $objectpage->author_alias; + $pagestatus = $objectpage->status; } else { @@ -3218,6 +3285,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') $pageauthorid = $user->id; $pageusermodifid = 0; $pageauthoralias = ''; + $pagestatus = 1; } if (GETPOST('WEBSITE_TITLE', 'alpha')) $pagetitle = GETPOST('WEBSITE_TITLE', 'alpha'); if (GETPOST('WEBSITE_PAGENAME', 'alpha')) $pageurl = GETPOST('WEBSITE_PAGENAME', 'alpha'); @@ -3228,20 +3296,6 @@ if ($action == 'editmeta' || $action == 'createcontainer') if (GETPOST('WEBSITE_LANG', 'aZ09')) $pagelang = GETPOST('WEBSITE_LANG', 'aZ09'); if (GETPOST('htmlheader', 'none')) $pagehtmlheader = GETPOST('htmlheader', 'none'); - // Title - print ''; - print $langs->trans('WEBSITE_TITLE'); - print ''; - print ''; - print ''; - - // Alias - print ''; - print $langs->trans('WEBSITE_PAGENAME'); - print ''; - print ''; - print ''; - // Type of container print ''; print $langs->trans('WEBSITE_TYPE_CONTAINER'); @@ -3258,6 +3312,20 @@ if ($action == 'editmeta' || $action == 'createcontainer') print ''; } + // Title + print ''; + print $langs->trans('WEBSITE_TITLE'); + print ''; + print ''; + print ''; + + // Alias + print ''; + print $langs->trans('WEBSITE_PAGENAME'); + print ''; + print ''; + print ''; + print ''; print $langs->trans('WEBSITE_DESCRIPTION'); print ''; @@ -3548,7 +3616,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print ''; - print ''."\n"; + print ''."\n"; print '

'; print load_fiche_titre($langs->trans("ReplaceWebsiteContent"), '', 'search'); @@ -3556,7 +3624,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print '
'; print '
'; - print '
'; + print '
'; print $langs->trans("SearchReplaceInto"); print '
'; print '
'; @@ -3593,15 +3661,15 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = $param = ''; $nbtotalofrecords = count($listofpages['list']); $num = $limit; - $permissiontodelete = 0; + $permissiontodelete = $user->rights->website->delete; // List of mass actions available $arrayofmassactions = array(); - if ($user->rights->website->writephp) $arrayofmassactions['replace'] = $langs->trans("Replace"); - if ($permissiontodelete) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); + if ($user->rights->website->writephp && $searchkey) $arrayofmassactions['replace'] = $langs->trans("Replace"); + //if ($permissiontodelete) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); - $massactionbutton .= '