2
0
forked from Wavyzz/dolibarr

Fix phpv8

This commit is contained in:
Laurent Destailleur
2022-07-28 18:30:26 +02:00
parent 3da20beeb5
commit eac926e01d
6 changed files with 24 additions and 20 deletions

View File

@@ -326,7 +326,7 @@ if ($resql) {
} }
} }
} else { } else {
print $langs->trans("ChooseABarCode"); print '<span class="opacitymedium">'.$langs->trans("ChooseABarCode").'</span>';
} }
print '</td>'; print '</td>';
@@ -369,7 +369,7 @@ if (!isset($_SERVER['WINDIR'])) {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$langs->trans("GenbarcodeLocation").'</td>'; print '<td>'.$langs->trans("GenbarcodeLocation").'</td>';
print '<td width="60" class="center">'; print '<td width="60" class="center">';
print '<input type="text" size="40" name="GENBARCODE_LOCATION" value="'.$conf->global->GENBARCODE_LOCATION.'">'; print '<input type="text" size="40" name="GENBARCODE_LOCATION" value="'.getDolGlobalString('GENBARCODE_LOCATION').'">';
if (!empty($conf->global->GENBARCODE_LOCATION) && !@file_exists($conf->global->GENBARCODE_LOCATION)) { if (!empty($conf->global->GENBARCODE_LOCATION) && !@file_exists($conf->global->GENBARCODE_LOCATION)) {
$langs->load("errors"); $langs->load("errors");
print '<br><span class="error">'.$langs->trans("ErrorFileNotFound", $conf->global->GENBARCODE_LOCATION).'</span>'; print '<br><span class="error">'.$langs->trans("ErrorFileNotFound", $conf->global->GENBARCODE_LOCATION).'</span>';

View File

@@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2014-2015 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2014-2022 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@@ -21,6 +21,7 @@
* \ingroup member * \ingroup member
* \brief Page to make mass init of barcode * \brief Page to make mass init of barcode
*/ */
require '../main.inc.php'; require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
@@ -264,23 +265,25 @@ if ($conf->product->enabled || $conf->product->service) {
dol_print_error($db); dol_print_error($db);
} }
print $langs->trans("CurrentlyNWithoutBarCode", $nbno, $nbtotal, $langs->transnoentitiesnoconv("ProductsOrServices")).'<br>'."\n"; print $langs->trans("CurrentlyNWithoutBarCode", $nbno, $nbtotal, $langs->transnoentitiesnoconv("ProductsOrServices"))."\n";
if (is_object($modBarCodeProduct)) { if (is_object($modBarCodeProduct)) {
print $langs->trans("BarCodeNumberManager").": "; print $langs->trans("BarCodeNumberManager").": ";
$objproduct = new Product($db); $objproduct = new Product($db);
print '<b>'.(isset($modBarCodeProduct->name) ? $modBarCodeProduct->name : $modBarCodeProduct->nom).'</b> - '.$langs->trans("NextValue").': <b>'.$modBarCodeProduct->getNextValue($objproduct).'</b><br>'; print '<b>'.(isset($modBarCodeProduct->name) ? $modBarCodeProduct->name : $modBarCodeProduct->nom).'</b> - '.$langs->trans("NextValue").': <b>'.$modBarCodeProduct->getNextValue($objproduct).'</b><br>';
$disabled = 0; $disabled = 0;
print '<br>';
} else { } else {
$disabled = 1; $disabled = 1;
$titleno = $langs->trans("NoBarcodeNumberingTemplateDefined"); $titleno = $langs->trans("NoBarcodeNumberingTemplateDefined");
print '<span class="warning">'.$langs->trans("NoBarcodeNumberingTemplateDefined").'</span> (<a href="'.DOL_URL_ROOT.'/admin/barcode.php">'.$langs->trans("ToGenerateCodeDefineAutomaticRuleFirst").'</a>)<br>'; print '<br><div class="warning">'.$langs->trans("NoBarcodeNumberingTemplateDefined");
print '<br><a href="'.DOL_URL_ROOT.'/admin/barcode.php">'.$langs->trans("ToGenerateCodeDefineAutomaticRuleFirst").'</a>';
print '</div>';
} }
if (empty($nbno)) { if (empty($nbno)) {
$disabled1 = 1; $disabled1 = 1;
} }
print '<br>';
//print '<input type="checkbox" id="erasealreadyset" name="erasealreadyset"> '.$langs->trans("ResetBarcodeForAllRecords").'<br>'; //print '<input type="checkbox" id="erasealreadyset" name="erasealreadyset"> '.$langs->trans("ResetBarcodeForAllRecords").'<br>';
$moretags1 = (($disabled || $disabled1) ? ' disabled title="'.dol_escape_htmltag($titleno).'"' : ''); $moretags1 = (($disabled || $disabled1) ? ' disabled title="'.dol_escape_htmltag($titleno).'"' : '');
print '<input type="submit" class="button" name="submitformbarcodeproductgen" id="submitformbarcodeproductgen" value="'.$langs->trans("InitEmptyBarCode", min($maxperinit, $nbno)).'"'.$moretags1.'>'; print '<input type="submit" class="button" name="submitformbarcodeproductgen" id="submitformbarcodeproductgen" value="'.$langs->trans("InitEmptyBarCode", min($maxperinit, $nbno)).'"'.$moretags1.'>';

View File

@@ -327,11 +327,11 @@ class FormActions
$cursorevent++; $cursorevent++;
} }
} else { } else {
print '<tr class="oddeven"><td colspan="6" class="opacitymedium">'.$langs->trans("None").'</td></tr>'; print '<tr class="oddeven"><td colspan="6"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
} }
if ($max && $num > $max) { if ($max && $num > $max) {
print '<tr class="oddeven"><td colspan="6" class="opacitymedium">'.$langs->trans("More").'...</td></tr>'; print '<tr class="oddeven"><td colspan="6"><span class="opacitymedium">'.$langs->trans("More").'...</span></td></tr>';
} }
print '</table>'; print '</table>';

View File

@@ -109,7 +109,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
//$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("BarCodeModel").'):</td>'; //$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("BarCodeModel").'):</td>';
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>'; $texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="value1" value="'.(!empty($conf->global->BARCODE_STANDARD_PRODUCT_MASK) ? $conf->global->BARCODE_STANDARD_PRODUCT_MASK : '').'"'.$disabled.'>', $tooltip, 1, 1).'</td>'; $texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="value1" value="'.(!empty($conf->global->BARCODE_STANDARD_PRODUCT_MASK) ? $conf->global->BARCODE_STANDARD_PRODUCT_MASK : '').'"'.$disabled.'>', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit reposition" name="modify" value="'.$langs->trans("Modify").'"'.$disabled.'></td>'; $texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit reposition small" name="modify" value="'.$langs->trans("Modify").'"'.$disabled.'></td>';
$texte .= '</tr>'; $texte .= '</tr>';
$texte .= '</table>'; $texte .= '</table>';

View File

@@ -474,6 +474,7 @@ if ($action == 'confirm_crop') {
* View * View
*/ */
$head = '';
$title = $langs->trans("ImageEditor"); $title = $langs->trans("ImageEditor");
$morejs = array('/includes/jquery/plugins/jcrop/js/jquery.Jcrop.min.js', '/core/js/lib_photosresize.js'); $morejs = array('/includes/jquery/plugins/jcrop/js/jquery.Jcrop.min.js', '/core/js/lib_photosresize.js');
$morecss = array('/includes/jquery/plugins/jcrop/css/jquery.Jcrop.css'); $morecss = array('/includes/jquery/plugins/jcrop/css/jquery.Jcrop.css');
@@ -505,8 +506,8 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
print '<fieldset id="redim_file">'; print '<fieldset id="redim_file">';
print '<legend>'.$langs->trans("Resize").'</legend>'; print '<legend>'.$langs->trans("Resize").'</legend>';
print $langs->trans("ResizeDesc").'<br>'; print $langs->trans("ResizeDesc").'<br>';
print $langs->trans("NewLength").': <input name="sizex" type="number" class="flat maxwidth50"> px &nbsp; '.$langs->trans("or").' &nbsp; '; print $langs->trans("NewLength").': <input name="sizex" type="number" class="flat maxwidth50 right"> px &nbsp; <span class="opacitymedium">'.$langs->trans("or").'</span> &nbsp; ';
print $langs->trans("NewHeight").': <input name="sizey" type="number" class="flat maxwidth50"> px &nbsp; <br>'; print $langs->trans("NewHeight").': <input name="sizey" type="number" class="flat maxwidth50 right"> px &nbsp; <br>';
print '<input type="hidden" name="file" value="'.dol_escape_htmltag($file).'" />'; print '<input type="hidden" name="file" value="'.dol_escape_htmltag($file).'" />';
print '<input type="hidden" name="action" value="confirm_resize" />'; print '<input type="hidden" name="action" value="confirm_resize" />';
@@ -564,12 +565,12 @@ if (!empty($conf->use_javascript_ajax)) {
print ' print '
<div class="jc_coords"> <div class="jc_coords">
'.$langs->trans("NewSizeAfterCropping").': '.$langs->trans("NewSizeAfterCropping").':
<label>X1 <input type="number" class="flat maxwidth50" id="x" name="x" /></label> &nbsp; <label>X1=<input type="number" class="flat maxwidth50" id="x" name="x" /></label>
<label>Y1 <input type="number" class="flat maxwidth50" id="y" name="y" /></label> &nbsp; <label>Y1=<input type="number" class="flat maxwidth50" id="y" name="y" /></label>
<label>X2 <input type="number" class="flat maxwidth50" id="x2" name="x2" /></label> &nbsp; <label>X2=<input type="number" class="flat maxwidth50" id="x2" name="x2" /></label>
<label>Y2 <input type="number" class="flat maxwidth50" id="y2" name="y2" /></label> &nbsp; <label>Y2=<input type="number" class="flat maxwidth50" id="y2" name="y2" /></label>
<label>W <input type="number" class="flat maxwidth50" id="w" name="w" /></label> &nbsp; <label>W=<input type="number" class="flat maxwidth50" id="w" name="w" /></label>
<label>H <input type="number" class="flat maxwidth50" id="h" name="h" /></label> &nbsp; <label>H=<input type="number" class="flat maxwidth50" id="h" name="h" /></label>
</div> </div>
<input type="hidden" id="file" name="file" value="'.dol_escape_htmltag($original_file).'" /> <input type="hidden" id="file" name="file" value="'.dol_escape_htmltag($original_file).'" />

View File

@@ -830,7 +830,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
if ($account->id == 0) { if ($account->id == 0) {
$colspan = 6; $colspan = 6;
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoBANRecord").'</td></tr>'; print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoBANRecord").'</span></td></tr>';
} }
print '</table>'; print '</table>';
@@ -891,7 +891,7 @@ if ($id && ($action == 'edit' || $action == 'create') && $user->rights->user->us
print '<tr><td class="tdtop">'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="4">'; print '<tr><td class="tdtop">'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="4">';
print '<textarea name="domiciliation" rows="4" class="quatrevingtpercent">'; print '<textarea name="domiciliation" rows="4" class="quatrevingtpercent">';
print $account->domiciliation; print dol_escape_htmltag($account->domiciliation);
print "</textarea></td></tr>"; print "</textarea></td></tr>";
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td>'; print '<tr><td>'.$langs->trans("BankAccountOwner").'</td>';
@@ -900,7 +900,7 @@ if ($id && ($action == 'edit' || $action == 'create') && $user->rights->user->us
print '<tr><td class="tdtop">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="4">'; print '<tr><td class="tdtop">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="4">';
print '<textarea name="owner_address" rows="4" class="quatrevingtpercent">'; print '<textarea name="owner_address" rows="4" class="quatrevingtpercent">';
print $account->owner_address; print dol_escape_htmltag($account->owner_address);
print "</textarea></td></tr>"; print "</textarea></td></tr>";
print '</table>'; print '</table>';