mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Qual: Fix textwithpicto $type argument (0->info,1->help)
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
return [
|
||||
// # Issue statistics:
|
||||
// PhanTypeMismatchArgument : 2450+ occurrences
|
||||
// PhanTypeMismatchArgument : 2340+ occurrences
|
||||
// PhanUndeclaredProperty : 530+ occurrences
|
||||
// PhanTypeMismatchArgumentNullable : 430+ occurrences
|
||||
// PhanUndeclaredGlobalVariable : 190+ occurrences
|
||||
@@ -92,29 +92,20 @@ return [
|
||||
'htdocs/adherents/subscription.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/adherents/type.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/adherents/vcard.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/agenda_other.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/agenda_other.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/agenda_reminder.php' => ['PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/admin/bank.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/barcode.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/bom.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/chequereceipts.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/company.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/contract.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/defaultvalues.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/delivery.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/dict.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/emailcollector_card.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/emailcollector_list.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/eventorganization.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/expedition.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/expensereport.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/expensereport_rules.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/external_rss.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/fckeditor.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/fichinter.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/holiday.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/hrm.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/invoice.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/knowledgemanagement.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/mails.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/mails_emailing.php' => ['PhanTypeMismatchArgumentNullable'],
|
||||
@@ -124,32 +115,19 @@ return [
|
||||
'htdocs/admin/mails_ticket.php' => ['PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/admin/menus/index.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/multicurrency.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/order.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/payment.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/paymentbybanktransfer.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/pdf_other.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/prelevement.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/propal.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/receiptprinter.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/reception_setup.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/remotestore/class/PSWebServiceLibrary.class.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/admin/remotestore/class/dolistore.class.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/stock.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/stocktransfer.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/supplier_invoice.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/supplier_order.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/supplier_payment.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/supplier_proposal.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/system/filecheck.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/system/modules.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/taxes.php' => ['PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/admin/ticket.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/tools/export.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/user.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/usergroup.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/webhook.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/website.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/admin/workstation.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/api/class/api_access.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/api/class/api_documents.class.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgument'],
|
||||
'htdocs/api/class/api_login.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgument'],
|
||||
@@ -442,7 +420,6 @@ return [
|
||||
'htdocs/core/modules/import/import_csv.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/core/modules/import/import_xlsx.modules.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/core/modules/mailings/eventorganization.modules.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/modules/mailings/modules_mailings.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/modules/member/doc/pdf_standard_member.class.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/modules/member/modules_cards.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/modules/modAdherent.class.php' => ['PhanTypeMismatchArgument'],
|
||||
@@ -470,10 +447,10 @@ return [
|
||||
'htdocs/core/modules/oauth/github_oauthcallback.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/project/doc/pdf_beluga.modules.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/modules/project/doc/pdf_timespent.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/propale/doc/pdf_azur.modules.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/propale/doc/pdf_cyan.modules.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/reception/doc/pdf_squille.modules.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable', 'PhanUndeclaredProperty'],
|
||||
@@ -491,8 +468,6 @@ return [
|
||||
'htdocs/core/modules/workstation/mod_workstation_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/multicompany_page.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/search_page.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/tpl/admin_extrafields_add.tpl.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/tpl/admin_extrafields_edit.tpl.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/tpl/extrafields_list_array_fields.tpl.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/core/tpl/extrafields_list_print_fields.tpl.php' => ['PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/core/tpl/extrafields_view.tpl.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredProperty'],
|
||||
@@ -623,14 +598,13 @@ return [
|
||||
'htdocs/opensurvey/wizard/create_survey.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/partnership/class/api_partnerships.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgument'],
|
||||
'htdocs/partnership/class/partnership.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredProperty'],
|
||||
'htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/partnership/partnership_card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/partnership/partnership_contact.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/partnership/partnership_list.php' => ['PhanTypeMismatchArgument', 'PhanUndeclaredProperty'],
|
||||
'htdocs/printing/index.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/product/admin/price_rules.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/product/admin/product.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/admin/product_lot.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/product/admin/product.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/admin/product_tools.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/product/ajax/products.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/canvas/product/actions_card_product.class.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable'],
|
||||
@@ -671,7 +645,7 @@ return [
|
||||
'htdocs/product/stock/class/entrepot.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/class/mouvementstock.class.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/product/stock/info.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgument', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/list.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/massstockmove.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/product/stock/movement_card.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/movement_list.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginUndeclaredVariableIsset', 'PhanTypeMismatchArgument', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
@@ -693,7 +667,7 @@ return [
|
||||
'htdocs/projet/activity/perday.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/projet/activity/permonth.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/projet/activity/perweek.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/projet/admin/project.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/projet/admin/project.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/projet/admin/website.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/projet/ajax/projects.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/projet/card.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable', 'PhanUndeclaredGlobalVariable'],
|
||||
@@ -762,8 +736,8 @@ return [
|
||||
'htdocs/reception/list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgument', 'PhanUndeclaredProperty'],
|
||||
'htdocs/reception/note.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/reception/stats/index.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/recruitment/admin/setup.php' => ['PhanEmptyForeach', 'PhanTypeMismatchArgument'],
|
||||
'htdocs/recruitment/admin/setup_candidatures.php' => ['PhanEmptyForeach', 'PhanTypeMismatchArgument'],
|
||||
'htdocs/recruitment/admin/setup.php' => ['PhanEmptyForeach'],
|
||||
'htdocs/recruitment/admin/setup_candidatures.php' => ['PhanEmptyForeach'],
|
||||
'htdocs/recruitment/class/api_recruitments.class.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable'],
|
||||
'htdocs/recruitment/class/recruitmentcandidature.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/recruitment/class/recruitmentjobposition.class.php' => ['PhanUndeclaredProperty'],
|
||||
@@ -826,7 +800,6 @@ return [
|
||||
'htdocs/supplier_proposal/list.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/supplier_proposal/note.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/takepos/admin/bar.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/takepos/admin/setup.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/takepos/admin/terminal.php' => ['PhanTypeMismatchArgument'],
|
||||
'htdocs/takepos/ajax/ajax.php' => ['PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/takepos/floors.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
||||
@@ -14,7 +14,8 @@ $config = include __DIR__.DIRECTORY_SEPARATOR."config.php";
|
||||
//require_once __DIR__.'/plugins/PriceFormFixer.php';
|
||||
//require_once __DIR__.'/plugins/UrlEncodeStringifyFixer.php';
|
||||
//require_once __DIR__.'/plugins/SelectDateFixer.php';
|
||||
require_once __DIR__.'/plugins/setPageOrientationFixer.php';
|
||||
//require_once __DIR__.'/plugins/setPageOrientationFixer.php';
|
||||
require_once __DIR__.'/plugins/textwithpictoFixer.php';
|
||||
//require_once __DIR__.'/plugins/MultiCellFixer.php';
|
||||
//require_once __DIR__.'/plugins/setAutoPageBreakFixer.php';
|
||||
//require_once __DIR__.'/plugins/CellFixer.php';
|
||||
|
||||
177
dev/tools/phan/plugins/textwithpictoFixer.php
Normal file
177
dev/tools/phan/plugins/textwithpictoFixer.php
Normal file
@@ -0,0 +1,177 @@
|
||||
<?php
|
||||
/* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* For 'price()', replace $form parameter that is '' with 0.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use ast\flags;
|
||||
use Microsoft\PhpParser\Node\Expression\CallExpression;
|
||||
use Microsoft\PhpParser\Node\QualifiedName;
|
||||
use Phan\AST\TolerantASTConverter\NodeUtils;
|
||||
use Phan\CodeBase;
|
||||
use Phan\IssueInstance;
|
||||
use Phan\Library\FileCacheEntry;
|
||||
use Phan\Plugin\Internal\IssueFixingPlugin\FileEdit;
|
||||
use Phan\Plugin\Internal\IssueFixingPlugin\FileEditSet;
|
||||
use Phan\Plugin\Internal\IssueFixingPlugin\IssueFixer;
|
||||
use Microsoft\PhpParser\Node\Expression\ArgumentExpression;
|
||||
use Microsoft\PhpParser\Node\DelimitedList\ArgumentExpressionList;
|
||||
use Microsoft\PhpParser\Node\StringLiteral;
|
||||
use Microsoft\PhpParser\Node\NumericLiteral;
|
||||
use Microsoft\PhpParser\Node\ReservedWord;
|
||||
use Microsoft\PhpParser\Token;
|
||||
|
||||
/**
|
||||
* This is a prototype, there are various features it does not implement.
|
||||
*/
|
||||
|
||||
call_user_func(static function (): void {
|
||||
/**
|
||||
* @param $code_base @unused-param
|
||||
* @return ?FileEditSet a representation of the edit to make to replace a call to a function alias with a call to the original function
|
||||
*/
|
||||
$fix = static function (CodeBase $code_base, FileCacheEntry $contents, IssueInstance $instance): ?FileEditSet {
|
||||
|
||||
// Argument {INDEX} (${PARAMETER}) is {CODE} of type {TYPE}{DETAILS} but
|
||||
// {FUNCTIONLIKE} takes {TYPE}{DETAILS} defined at {FILE}:{LINE} (the inferred real argument type has nothing in common with the parameter's phpdoc type)
|
||||
|
||||
//htdocs\supplier_proposal\card.php:1705 PhanTypeMismatchArgumentProbablyReal Argument 3 ($h) is '' of type '' but \Form::selectDate() takes int (no real type) defined at htdocs\core\class\html.form.class.php:6799 (the inferred real argument type has nothing in common with the parameter's phpdoc type)
|
||||
//htdocs\supplier_proposal\card.php:1705 PhanTypeMismatchArgumentProbablyReal Argument 4 ($m) is '' of type '' but \Form::selectDate() takes int (no real type) defined at htdocs\core\class\html.form.class.php:6799 (the inferred real argument type has nothing in common with the parameter's phpdoc type)
|
||||
// var_dump($instance->getTemplateParameters());
|
||||
$argument_index = (string) $instance->getTemplateParameters()[0];
|
||||
$argument_name = (string) $instance->getTemplateParameters()[1];
|
||||
$argument_code = (string) $instance->getTemplateParameters()[2];
|
||||
$argument_type = (string) $instance->getTemplateParameters()[3];
|
||||
$functionlike = (string) $instance->getTemplateParameters()[4];
|
||||
$functiontype = (string) $instance->getTemplateParameters()[5];
|
||||
|
||||
$expected_functionlike = "\\Form::textwithpicto()";
|
||||
$expected_name = "textwithpicto";
|
||||
if ($functionlike !== $expected_functionlike) {
|
||||
//print "$functionlike != '$expected_functionlike'".PHP_EOL;
|
||||
return null;
|
||||
}
|
||||
|
||||
$toBoolReplaceArray = array("0" => "'info'","1" => "'help'");
|
||||
// Check if we fix any of this
|
||||
if (
|
||||
($argument_name === 'type' && in_array($argument_code, array_keys($toBoolReplaceArray)))
|
||||
//|| ($argument_name === 'm' && $argument_code === "''")
|
||||
//|| ($argument_name === 'empty' && $argument_code === "''")
|
||||
) {
|
||||
$replacement = $toBoolReplaceArray[$argument_code];
|
||||
$argIdx = ($argument_index - 1) * 2;
|
||||
$expectedStringValue = $argument_code;
|
||||
} else {
|
||||
print "ARG$argument_index:$argument_name CODE:$argument_name".PHP_EOL;
|
||||
return null;
|
||||
}
|
||||
|
||||
// At this point we established that the notification
|
||||
// matches some we fix.
|
||||
|
||||
$line = $instance->getLine();
|
||||
|
||||
$edits = [];
|
||||
foreach ($contents->getNodesAtLine($line) as $node) {
|
||||
if (!$node instanceof ArgumentExpressionList) {
|
||||
continue;
|
||||
}
|
||||
$arguments = $node->children;
|
||||
if (count($arguments) <= $argIdx) {
|
||||
// print "Arg Count is ".count($arguments)." - Skip $instance".PHP_EOL;
|
||||
continue;
|
||||
}
|
||||
|
||||
$is_actual_call = $node->parent instanceof CallExpression;
|
||||
if (!$is_actual_call) {
|
||||
// print "Not actual call - Skip $instance".PHP_EOL;
|
||||
continue;
|
||||
}
|
||||
|
||||
print "Actual call - $instance".PHP_EOL;
|
||||
$callable = $node->parent;
|
||||
|
||||
$callableExpression = $callable->callableExpression;
|
||||
|
||||
if ($callableExpression instanceof Microsoft\PhpParser\Node\QualifiedName) {
|
||||
$actual_name = $callableExpression->getResolvedName();
|
||||
} elseif ($callableExpression instanceof Microsoft\PhpParser\Node\Expression\MemberAccessExpression) {
|
||||
$memberNameToken = $callableExpression->memberName;
|
||||
$actual_name = (new NodeUtils($contents->getContents()))->tokenToString($memberNameToken);
|
||||
} else {
|
||||
print "Callable expression is ".get_class($callableExpression)."- Skip $instance".PHP_EOL;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((string) $actual_name !== (string) $expected_name) {
|
||||
// print "Name unexpected '$actual_name'!='$expected_name' - Skip $instance".PHP_EOL;
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($arguments as $i => $argument) {
|
||||
if ($argument instanceof ArgumentExpression) {
|
||||
// print "Type$i: ".get_class($argument->expression).PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
$fieldValue = null;
|
||||
|
||||
|
||||
$arg = $arguments[$argIdx];
|
||||
|
||||
if (
|
||||
$arg instanceof ArgumentExpression
|
||||
&& $arg->expression instanceof NumericLiteral
|
||||
) {
|
||||
// Get the string value of the NumericLiteral
|
||||
$fieldValue = (string) $arg->expression;
|
||||
//print "Field is '$fieldValue'".PHP_EOL;
|
||||
} elseif ($arg instanceof ArgumentExpression && $arg->expression instanceof ReservedWord) {
|
||||
$child = $arg->expression->children;
|
||||
if (!$child instanceof Token) {
|
||||
continue;
|
||||
}
|
||||
$token_str = (new NodeUtils($contents->getContents()))->tokenToString($child);
|
||||
print "$token_str KIND:".($child->kind ?? 'no kind')." ".get_class($child).PHP_EOL;
|
||||
|
||||
if ($token_str !== 'null') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$fieldValue = ''; // Fake empty
|
||||
} else {
|
||||
// print "Expression is not expected type ".get_class($arg)."/".get_class($arg->expression)."- Skip $instance".PHP_EOL;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($fieldValue !== $expectedStringValue) {
|
||||
// print "Not replacing '$argument_name' which is '$fieldValue'/".get_class($arg)."/".get_class($arg->expression)."- Skip $instance".PHP_EOL;
|
||||
continue;
|
||||
}
|
||||
|
||||
print "Fixture elem on $line - $actual_name(...'$fieldValue'...) - $instance".PHP_EOL;
|
||||
|
||||
|
||||
|
||||
// Get the first argument (delimiter)
|
||||
$argument_to_replace = $arg;
|
||||
|
||||
$arg_start_pos = $argument_to_replace->getStartPosition();
|
||||
$arg_end_pos = $argument_to_replace->getEndPosition();
|
||||
|
||||
// Set edit instruction
|
||||
$edits[] = new FileEdit($arg_start_pos, $arg_end_pos, $replacement);
|
||||
}
|
||||
if ($edits) {
|
||||
return new FileEditSet($edits);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
IssueFixer::registerFixerClosure(
|
||||
'PhanTypeMismatchArgument',
|
||||
$fix
|
||||
);
|
||||
});
|
||||
@@ -10,7 +10,7 @@
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2020-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2023 Waël Almoman <info@almoman.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -461,7 +461,7 @@ foreach ($dirmodels as $reldir) {
|
||||
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2017 Open-DSI <support@open-dsi.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -320,7 +320,7 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
||||
$htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
||||
$htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -413,7 +413,7 @@ foreach ($dirmodels as $reldir) {
|
||||
//$htmltooltip .= '<br>' . $langs->trans("WatermarkOnDraftOrders") . ': ' . yn($module->option_draft_watermark, 1, 1);
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -283,7 +283,7 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
@@ -420,7 +420,7 @@ foreach ($dirmodels as $reldir) {
|
||||
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -226,7 +226,7 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
|
||||
if (getDolGlobalString('CHEQUERECEIPTS_ADDON').'.php' == $file) { // If module is the one used, we show existing errors
|
||||
if (!empty($module->error)) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -316,7 +316,7 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
@@ -456,7 +456,7 @@ foreach ($dirmodels as $reldir) {
|
||||
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -328,7 +328,7 @@ if (getDolGlobalString('MAIN_SUBMODULE_DELIVERY')) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
@@ -456,7 +456,7 @@ if (getDolGlobalString('MAIN_SUBMODULE_DELIVERY')) {
|
||||
$htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").'</u>:';
|
||||
$htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -272,7 +272,7 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
@@ -408,7 +408,7 @@ foreach ($dirmodels as $reldir) {
|
||||
$htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2022 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -298,7 +298,7 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
@@ -427,7 +427,7 @@ foreach ($dirmodels as $reldir) {
|
||||
$htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
|
||||
$htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, -1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, -1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -364,7 +364,7 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
}
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
@@ -503,7 +503,7 @@ foreach ($dirmodels as $reldir) {
|
||||
$htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
|
||||
$htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, -1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, -1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -274,7 +274,7 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
@@ -419,7 +419,7 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
||||
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2021 Greg Rastklan <greg.rastklan@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -331,7 +331,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
@@ -471,7 +471,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
||||
$htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Copyright (C) 2012-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com>
|
||||
* Copyright (C) 2022 Anthony Berton <anthony.berton@bb2a.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
*
|
||||
@@ -451,7 +451,7 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
|
||||
if (getDolGlobalString('FACTURE_ADDON') . '.php' == $file) { // If module is the one used, we show existing errors
|
||||
if (!empty($module->error)) {
|
||||
@@ -608,7 +608,7 @@ foreach ($dirmodels as $reldir) {
|
||||
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -450,7 +450,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
@@ -589,7 +589,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
||||
$htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* Copyright (C) 2011-2016 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2021-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -368,7 +368,7 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
@@ -509,7 +509,7 @@ foreach ($dirmodels as $reldir) {
|
||||
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2020 Maxime DEMAREST <maxime@indelog.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -230,7 +230,7 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
|
||||
if (getDolGlobalString('PAYMENT_ADDON') . '.php' == $file) { // If module is the one used, we show existing errors
|
||||
if (!empty($module->error)) {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -346,7 +346,7 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
@@ -486,7 +486,7 @@ foreach ($dirmodels as $reldir) {
|
||||
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2018 Quentin Vial-Gouteyron <quentin.vial-gouteyron@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -279,7 +279,7 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
@@ -421,7 +421,7 @@ foreach ($dirmodels as $reldir) {
|
||||
$htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2012-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -656,7 +656,7 @@ foreach ($dirmodels as $reldir) {
|
||||
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2021 SuperAdmin
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -337,7 +337,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
@@ -473,7 +473,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
||||
$htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -303,7 +303,7 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
@@ -441,7 +441,7 @@ foreach ($dirmodels as $reldir) {
|
||||
$htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1);
|
||||
$htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.urlencode($name).'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -320,7 +320,7 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
@@ -446,7 +446,7 @@ foreach ($dirmodels as $reldir) {
|
||||
$htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1);
|
||||
$htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.urlencode($name).'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2020 Maxime DEMAREST <maxime@indelog.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -307,7 +307,7 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
|
||||
if (getDolGlobalString("PAYMENT_ADDON").'.php' == $file) { // If module is the one used, we show existing errors
|
||||
if (!empty($module->error)) {
|
||||
@@ -421,7 +421,7 @@ foreach ($dirmodels as $reldir) {
|
||||
$htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
||||
$htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -336,7 +336,7 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
@@ -475,7 +475,7 @@ foreach ($dirmodels as $reldir) {
|
||||
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2020-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -317,7 +317,7 @@ foreach ($dirmodels as $reldir) {
|
||||
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -236,7 +236,7 @@ foreach ($dirmodels as $reldir) {
|
||||
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2020 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -281,7 +281,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
@@ -415,7 +415,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
||||
$htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -301,7 +301,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
@@ -439,7 +439,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
||||
$htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -111,7 +111,7 @@ class MailingTargets // This can't be abstract as it is used for some method
|
||||
}
|
||||
|
||||
if ($this->tooltip && is_object($form)) {
|
||||
$s .= ' '.$form->textwithpicto('', $langs->trans($this->tooltip), 1, 1);
|
||||
$s .= ' '.$form->textwithpicto('', $langs->trans($this->tooltip), 1, 'help');
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -194,12 +195,12 @@ print $formadmin->selectTypeOfFields('type', GETPOST('type', 'alpha'));
|
||||
<tr><td>
|
||||
<textarea name="param" id="param" cols="80" rows="<?php echo ROWS_4 ?>"><?php echo GETPOST('param', 'alpha'); ?></textarea>
|
||||
</td><td>
|
||||
<span id="helpselect" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"), 1, 0, '', 0, 2, 'helpvalue1')?></span>
|
||||
<span id="helpsellist" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist").(getDolGlobalInt('MAIN_FEATUREES_LEVEL') > 0 ? '<br>'.$langs->trans("ExtrafieldParamHelpsellist2") : ''), 1, 0, '', 0, 2, 'helpvalue2')?></span>
|
||||
<span id="helpchkbxlst" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist").(getDolGlobalInt('MAIN_FEATUREES_LEVEL') > 0 ? '<br>'.$langs->trans("ExtrafieldParamHelpsellist2") : ''), 1, 0, '', 0, 2, 'helpvalue3')?></span>
|
||||
<span id="helplink" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelplink").'<br><br>'.$langs->trans("Examples").':<br>'.$listofexamplesforlink, 1, 0, '', 0, 2, 'helpvalue4')?></span>
|
||||
<span id="helppassword" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpPassword"), 1, 0, '', 0, 2, 'helpvalue5')?></span>
|
||||
<span id="helpseparate" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpSeparator"), 1, 0, '', 0, 2, 'helpvalue6')?></span>
|
||||
<span id="helpselect" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"), 1, 'info', '', 0, 2, 'helpvalue1')?></span>
|
||||
<span id="helpsellist" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist").(getDolGlobalInt('MAIN_FEATUREES_LEVEL') > 0 ? '<br>'.$langs->trans("ExtrafieldParamHelpsellist2") : ''), 1, 'info', '', 0, 2, 'helpvalue2')?></span>
|
||||
<span id="helpchkbxlst" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist").(getDolGlobalInt('MAIN_FEATUREES_LEVEL') > 0 ? '<br>'.$langs->trans("ExtrafieldParamHelpsellist2") : ''), 1, 'info', '', 0, 2, 'helpvalue3')?></span>
|
||||
<span id="helplink" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelplink").'<br><br>'.$langs->trans("Examples").':<br>'.$listofexamplesforlink, 1, 'info', '', 0, 2, 'helpvalue4')?></span>
|
||||
<span id="helppassword" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpPassword"), 1, 'info', '', 0, 2, 'helpvalue5')?></span>
|
||||
<span id="helpseparate" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpSeparator"), 1, 'info', '', 0, 2, 'helpvalue6')?></span>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -210,18 +211,18 @@ if (is_array($param)) {
|
||||
<?php
|
||||
// Define list of possible type transition
|
||||
$typewecanchangeinto = array(
|
||||
'varchar'=>array('varchar', 'phone', 'mail', 'url', 'ip', 'select', 'password', 'text', 'html'),
|
||||
'double'=>array('double', 'price'),
|
||||
'price'=>array('double', 'price'),
|
||||
'text'=>array('text', 'html'),
|
||||
'html'=>array('text', 'html'),
|
||||
'password'=>array('password', 'varchar'),
|
||||
'mail'=>array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
|
||||
'url'=>array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
|
||||
'phone'=>array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
|
||||
'ip'=>array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
|
||||
'select'=>array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
|
||||
'date'=>array('date', 'datetime')
|
||||
'varchar' => array('varchar', 'phone', 'mail', 'url', 'ip', 'select', 'password', 'text', 'html'),
|
||||
'double' => array('double', 'price'),
|
||||
'price' => array('double', 'price'),
|
||||
'text' => array('text', 'html'),
|
||||
'html' => array('text', 'html'),
|
||||
'password' => array('password', 'varchar'),
|
||||
'mail' => array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
|
||||
'url' => array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
|
||||
'phone' => array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
|
||||
'ip' => array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
|
||||
'select' => array('varchar', 'phone', 'mail', 'url', 'ip', 'select'),
|
||||
'date' => array('date', 'datetime')
|
||||
);
|
||||
/* Disabled because text is text on several lines, when varchar is text on 1 line, we should not be able to convert
|
||||
if ($size <= 255 && in_array($type, array('text', 'html'))) {
|
||||
@@ -256,12 +257,12 @@ if (in_array($type, array_keys($typewecanchangeinto))) {
|
||||
<tr><td>
|
||||
<textarea name="param" id="param" cols="80" rows="<?php echo ROWS_4 ?>"><?php echo dol_htmlcleanlastbr($param_chain); ?></textarea>
|
||||
</td><td>
|
||||
<span id="helpselect" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"), 1, 0, '', 0, 2, 'helpvalue1')?></span>
|
||||
<span id="helpsellist" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist").(getDolGlobalInt('MAIN_FEATUREES_LEVEL') > 0 ? '<br>'.$langs->trans("ExtrafieldParamHelpsellist2") : ''), 1, 0, '', 0, 2, 'helpvalue2')?></span>
|
||||
<span id="helpchkbxlst" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist").(getDolGlobalInt('MAIN_FEATUREES_LEVEL') > 0 ? '<br>'.$langs->trans("ExtrafieldParamHelpsellist2") : ''), 1, 0, '', 0, 2, 'helpvalue3')?></span>
|
||||
<span id="helplink" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelplink").'<br><br>'.$langs->trans("Examples").':<br>'.$listofexamplesforlink, 1, 0, '', 0, 2, 'helpvalue4')?></span>
|
||||
<span id="helppassword" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpPassword"), 1, 0, '', 0, 2, 'helpvalue5')?></span>
|
||||
<span id="helpseparate" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpSeparator"), 1, 0, '', 0, 2, 'helpvalue6')?></span>
|
||||
<span id="helpselect" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"), 1, 'info', '', 0, 2, 'helpvalue1')?></span>
|
||||
<span id="helpsellist" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist").(getDolGlobalInt('MAIN_FEATUREES_LEVEL') > 0 ? '<br>'.$langs->trans("ExtrafieldParamHelpsellist2") : ''), 1, 'info', '', 0, 2, 'helpvalue2')?></span>
|
||||
<span id="helpchkbxlst" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist").(getDolGlobalInt('MAIN_FEATUREES_LEVEL') > 0 ? '<br>'.$langs->trans("ExtrafieldParamHelpsellist2") : ''), 1, 'info', '', 0, 2, 'helpvalue3')?></span>
|
||||
<span id="helplink" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelplink").'<br><br>'.$langs->trans("Examples").':<br>'.$listofexamplesforlink, 1, 'info', '', 0, 2, 'helpvalue4')?></span>
|
||||
<span id="helppassword" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpPassword"), 1, 'info', '', 0, 2, 'helpvalue5')?></span>
|
||||
<span id="helpseparate" class="spanforparamtooltip"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpSeparator"), 1, 'info', '', 0, 2, 'helpvalue6')?></span>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -82,7 +82,7 @@ class mod_partnership_advanced extends ModeleNumRefPartnership
|
||||
|
||||
// Parametrage du prefix
|
||||
$text .= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$text .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskPartnership" value="'.getDolGlobalString('PARTNERSHIP_ADVANCED_MASK').'">', $tooltip, 1, 1).'</td>';
|
||||
$text .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskPartnership" value="'.getDolGlobalString('PARTNERSHIP_ADVANCED_MASK').'">', $tooltip, 1, 'help').'</td>';
|
||||
|
||||
$text .= '<td class="left" rowspan="2"> <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -69,7 +69,7 @@ $select_pricing_rules = array(
|
||||
'PRODUCT_PRICE_UNIQ' => $langs->trans('PriceCatalogue'), // Unique price
|
||||
'PRODUIT_MULTIPRICES' => $langs->trans('MultiPricesAbility'), // Several prices according to a customer level
|
||||
'PRODUIT_CUSTOMER_PRICES' => $langs->trans('PriceByCustomer'), // Different price for each customer
|
||||
'PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES'=>$langs->trans('PriceByCustomeAndMultiPricesAbility'), // Different price for each customer and several prices according to a customer level
|
||||
'PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES' => $langs->trans('PriceByCustomeAndMultiPricesAbility'), // Different price for each customer and several prices according to a customer level
|
||||
);
|
||||
$keyforparam = 'PRODUIT_CUSTOMER_PRICES_BY_QTY';
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 1 || getDolGlobalString($keyforparam)) {
|
||||
@@ -504,7 +504,7 @@ foreach ($dirmodels as $reldir) {
|
||||
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2021 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -280,7 +280,7 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
@@ -382,7 +382,7 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
@@ -511,7 +511,7 @@ foreach ($dirmodels as $reldir) {
|
||||
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* Copyright (C) 2019-2020 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
|
||||
* Copyright (C) 2022 Vincent de Grandpré <vincent@de-grandpre.quebec>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -1513,7 +1513,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
||||
$inherited_mask_lot = getDolGlobalString('LOT_ADVANCED_MASK');
|
||||
$inherited_mask_sn = getDolGlobalString('SN_ADVANCED_MASK');
|
||||
print '<td id="field_mask">';
|
||||
print $form->textwithpicto('<input type="text" class="flat minwidth175" name="batch_mask" id="batch_mask_input">', $tooltip, 1, 1);
|
||||
print $form->textwithpicto('<input type="text" class="flat minwidth175" name="batch_mask" id="batch_mask_input">', $tooltip, 1, 'help');
|
||||
print '<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#field_mask, #mask_option").addClass("hideobject");
|
||||
@@ -1656,7 +1656,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
||||
if (!getDolGlobalString('SERVICE_STRICT_MANDATORY_PERIOD')) {
|
||||
$htmltooltip .= '<br>'.$langs->trans("mandatoryHelper2");
|
||||
}
|
||||
print $form->textwithpicto($langs->trans("mandatoryperiod"), $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto($langs->trans("mandatoryperiod"), $htmltooltip, 1, 'info');
|
||||
print '</label>';
|
||||
|
||||
print '</td></tr>';
|
||||
@@ -2125,7 +2125,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
||||
$inherited_mask_lot = getDolGlobalString('LOT_ADVANCED_MASK');
|
||||
$inherited_mask_sn = getDolGlobalString('SN_ADVANCED_MASK');
|
||||
print '<td id="field_mask">';
|
||||
print $form->textwithpicto('<input type="text" class="flat minwidth175" name="batch_mask" id="batch_mask_input" value="'.$mask.'">', $tooltip, 1, 1);
|
||||
print $form->textwithpicto('<input type="text" class="flat minwidth175" name="batch_mask" id="batch_mask_input" value="'.$mask.'">', $tooltip, 1, 'help');
|
||||
// Add javascript to sho/hide field for custom mask
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print '<script type="text/javascript">
|
||||
@@ -2276,7 +2276,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
||||
|
||||
// Mandatory period
|
||||
//if ($object->duration_value > 0) {
|
||||
print ' ';
|
||||
print ' ';
|
||||
//}
|
||||
print '<input type="checkbox" class="valignmiddle" id="mandatoryperiod" name="mandatoryperiod"'.($object->mandatory_period == 1 ? ' checked="checked"' : '').'>';
|
||||
print '<label for="mandatoryperiod">';
|
||||
@@ -2284,7 +2284,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
||||
if (!getDolGlobalString('SERVICE_STRICT_MANDATORY_PERIOD')) {
|
||||
$htmltooltip .= '<br>'.$langs->trans("mandatoryHelper2");
|
||||
}
|
||||
print $form->textwithpicto($langs->trans("mandatoryperiod"), $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto($langs->trans("mandatoryperiod"), $htmltooltip, 1, 'info');
|
||||
print '</label>';
|
||||
|
||||
print '</td></tr>';
|
||||
@@ -2812,7 +2812,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
||||
print '<tr><td class="titlefieldmiddle">'.$langs->trans("Duration").'</td><td>';
|
||||
if ($object->duration_value) {
|
||||
print $object->duration_value;
|
||||
print (!empty($object->duration_unit) && isset($durations[$object->duration_unit]) ? " ".$langs->trans($durations[$object->duration_unit])." " : '');
|
||||
print(!empty($object->duration_unit) && isset($durations[$object->duration_unit]) ? " ".$langs->trans($durations[$object->duration_unit])." " : '');
|
||||
}
|
||||
|
||||
// Mandatory period
|
||||
@@ -2824,7 +2824,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
||||
print ' ';
|
||||
}
|
||||
print '<input type="checkbox" class="valignmiddle" name="mandatoryperiod"'.($object->mandatory_period == 1 ? ' checked="checked"' : '').' disabled>';
|
||||
print $form->textwithpicto($langs->trans("mandatoryperiod"), $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto($langs->trans("mandatoryperiod"), $htmltooltip, 1, 'info');
|
||||
|
||||
print '</td></tr>';
|
||||
} else {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Mélina Joum <melina.joum@altairis.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -1733,7 +1733,7 @@ if (($action == 'edit_price' || $action == 'edit_level_price') && $object->getRi
|
||||
$product->fetch($id, $ref, '', 1); //Ignore the math expression when getting the price
|
||||
print '<tr id="price_numeric"><td>';
|
||||
$text = $langs->trans('SellingPrice');
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1);
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 'help');
|
||||
print '</td><td>';
|
||||
if ($object->price_base_type == 'TTC') {
|
||||
print '<input name="price" size="10" value="'.price($product->price_ttc).'">';
|
||||
@@ -1745,7 +1745,7 @@ if (($action == 'edit_price' || $action == 'edit_level_price') && $object->getRi
|
||||
// Price minimum
|
||||
print '<tr><td>';
|
||||
$text = $langs->trans('MinPrice');
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1);
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 'help');
|
||||
print '</td><td>';
|
||||
if ($object->price_base_type == 'TTC') {
|
||||
print '<input name="price_min" size="10" value="'.price($object->price_min_ttc).'">';
|
||||
@@ -1928,7 +1928,7 @@ if (($action == 'edit_price' || $action == 'edit_level_price') && $object->getRi
|
||||
print '<td>';
|
||||
$keyforlabel = 'PRODUIT_MULTIPRICES_LABEL'.$i;
|
||||
$text = $langs->trans('SellingPrice').' '.$i.' - '.getDolGlobalString($keyforlabel);
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1);
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 'help');
|
||||
print '</td>';
|
||||
|
||||
// VAT
|
||||
@@ -2106,7 +2106,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT
|
||||
// Price
|
||||
print '<tr><td class="fieldrequired">';
|
||||
$text = $langs->trans('SellingPrice');
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1);
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 'help');
|
||||
print '</td><td>';
|
||||
if ($object->price_base_type == 'TTC') {
|
||||
print '<input name="price" size="10" value="'.price($object->price_ttc).'">';
|
||||
@@ -2118,7 +2118,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT
|
||||
// Price minimum
|
||||
print '<tr><td>';
|
||||
$text = $langs->trans('MinPrice');
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1);
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 'help');
|
||||
if ($object->price_base_type == 'TTC') {
|
||||
print '<td><input name="price_min" size="10" value="'.price($object->price_min_ttc).'">';
|
||||
} else {
|
||||
@@ -2223,7 +2223,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT
|
||||
// Price
|
||||
print '<tr><td class="fieldrequired">';
|
||||
$text = $langs->trans('SellingPrice');
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1);
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 'help');
|
||||
print '</td><td>';
|
||||
if ($prodcustprice->price_base_type == 'TTC') {
|
||||
print '<input name="price" size="10" value="'.price($prodcustprice->price_ttc).'">';
|
||||
@@ -2235,7 +2235,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT
|
||||
// Price minimum
|
||||
print '<tr><td>';
|
||||
$text = $langs->trans('MinPrice');
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1);
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 'help');
|
||||
print '</td><td>';
|
||||
if ($prodcustprice->price_base_type == 'TTC') {
|
||||
print '<input name="price_min" size="10" value="'.price($prodcustprice->price_min_ttc).'">';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -395,7 +395,7 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
@@ -495,7 +495,7 @@ if (!getDolGlobalString('PROJECT_HIDE_TASKS')) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
@@ -634,7 +634,7 @@ foreach ($dirmodels as $reldir) {
|
||||
$htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
@@ -780,7 +780,7 @@ if (!getDolGlobalString('PROJECT_HIDE_TASKS')) {
|
||||
$htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -343,7 +343,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
@@ -482,7 +482,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
||||
$htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -337,7 +337,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
@@ -476,7 +476,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
||||
$htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -659,7 +659,7 @@ foreach ($dirsociete as $dirroot) {
|
||||
$htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraft").': '.yn((isset($module->option_draft_watermark) ? $module->option_draft_watermark : ''), 1, 1);
|
||||
|
||||
print '<td class="center nowrap">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -318,7 +318,7 @@ abstract class ActionsCardCommon
|
||||
|
||||
$img = picto_from_langcode($this->object->country_code);
|
||||
if ($this->object->isInEEC()) {
|
||||
$this->tpl['country'] = $form->textwithpicto(($img ? $img.' ' : '').$this->object->country, $langs->trans("CountryIsInEEC"), 1, 0);
|
||||
$this->tpl['country'] = $form->textwithpicto(($img ? $img.' ' : '').$this->object->country, $langs->trans("CountryIsInEEC"), 1, 'info');
|
||||
}
|
||||
$this->tpl['country'] = ($img ? $img.' ' : '').$this->object->country;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* Copyright (C) 2021-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2022 Anthony Berton <anthony.berton@bb2a.fr>
|
||||
* Copyright (C) 2023 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
* Copyright (C) 2024 Nick Fragoulis
|
||||
*
|
||||
@@ -319,7 +319,7 @@ $arrayfields = array(
|
||||
's.fk_prospectlevel' => array('label' => "ProspectLevel", 'position' => 62, 'checked' => $checkprospectlevel),
|
||||
's.fk_stcomm' => array('label' => "StatusProsp", 'position' => 63, 'checked' => $checkstcomm),
|
||||
's2.nom' => array('label' => 'ParentCompany', 'position' => 64, 'checked' => 0),
|
||||
's.ip' => array('type'=>'ip', 'label' => "IPAddress", 'checked' => -2, 'position' => 500),
|
||||
's.ip' => array('type' => 'ip', 'label' => "IPAddress", 'checked' => -2, 'position' => 500),
|
||||
's.datec' => array('label' => "DateCreation", 'checked' => 0, 'position' => 501),
|
||||
's.tms' => array('label' => "DateModificationShort", 'checked' => 0, 'position' => 505),
|
||||
's.note_public' => array('label' => 'NotePublic', 'checked' => 0, 'position' => 520, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))),
|
||||
@@ -1730,27 +1730,27 @@ if (!empty($arrayfields['s.url']['checked'])) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['s.siren']['checked'])) {
|
||||
print_liste_field_titre($form->textwithpicto($langs->trans("ProfId1Short"), $textprofid[1], 1, 0), $_SERVER["PHP_SELF"], "s.siren", "", $param, '', $sortfield, $sortorder, 'nowrap ');
|
||||
print_liste_field_titre($form->textwithpicto($langs->trans("ProfId1Short"), $textprofid[1], 1, 'info'), $_SERVER["PHP_SELF"], "s.siren", "", $param, '', $sortfield, $sortorder, 'nowrap ');
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['s.siret']['checked'])) {
|
||||
print_liste_field_titre($form->textwithpicto($langs->trans("ProfId2Short"), $textprofid[2], 1, 0), $_SERVER["PHP_SELF"], "s.siret", "", $param, '', $sortfield, $sortorder, 'nowrap ');
|
||||
print_liste_field_titre($form->textwithpicto($langs->trans("ProfId2Short"), $textprofid[2], 1, 'info'), $_SERVER["PHP_SELF"], "s.siret", "", $param, '', $sortfield, $sortorder, 'nowrap ');
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['s.ape']['checked'])) {
|
||||
print_liste_field_titre($form->textwithpicto($langs->trans("ProfId3Short"), $textprofid[3], 1, 0), $_SERVER["PHP_SELF"], "s.ape", "", $param, '', $sortfield, $sortorder, 'nowrap ');
|
||||
print_liste_field_titre($form->textwithpicto($langs->trans("ProfId3Short"), $textprofid[3], 1, 'info'), $_SERVER["PHP_SELF"], "s.ape", "", $param, '', $sortfield, $sortorder, 'nowrap ');
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['s.idprof4']['checked'])) {
|
||||
print_liste_field_titre($form->textwithpicto($langs->trans("ProfId4Short"), $textprofid[4], 1, 0), $_SERVER["PHP_SELF"], "s.idprof4", "", $param, '', $sortfield, $sortorder, 'nowrap ');
|
||||
print_liste_field_titre($form->textwithpicto($langs->trans("ProfId4Short"), $textprofid[4], 1, 'info'), $_SERVER["PHP_SELF"], "s.idprof4", "", $param, '', $sortfield, $sortorder, 'nowrap ');
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['s.idprof5']['checked'])) {
|
||||
print_liste_field_titre($form->textwithpicto($langs->trans("ProfId5Short"), $textprofid[5], 1, 0), $_SERVER["PHP_SELF"], "s.idprof5", "", $param, '', $sortfield, $sortorder, 'nowrap ');
|
||||
print_liste_field_titre($form->textwithpicto($langs->trans("ProfId5Short"), $textprofid[5], 1, 'info'), $_SERVER["PHP_SELF"], "s.idprof5", "", $param, '', $sortfield, $sortorder, 'nowrap ');
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['s.idprof6']['checked'])) {
|
||||
print_liste_field_titre($form->textwithpicto($langs->trans("ProfId6Short"), $textprofid[6], 1, 0), $_SERVER["PHP_SELF"], "s.idprof6", "", $param, '', $sortfield, $sortorder, 'nowrap ');
|
||||
print_liste_field_titre($form->textwithpicto($langs->trans("ProfId6Short"), $textprofid[6], 1, 'info'), $_SERVER["PHP_SELF"], "s.idprof6", "", $param, '', $sortfield, $sortorder, 'nowrap ');
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['s.tva_intra']['checked'])) {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
* Copyright (C) 2023 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 Mélina Joum <melina.joum@altairis.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
@@ -216,8 +217,8 @@ if (empty($reshook)) {
|
||||
$result = $prodcustprice->update($user, 0, $update_child_soc);
|
||||
if ($result > 0) {
|
||||
$extrafields->fetch_name_optionals_label("product_customer_price");
|
||||
$extralabels = !empty($extrafields->attributes["product_customer_price"]['label']) ? $extrafields->attributes["product_customer_price"]['label'] : '';
|
||||
$extrafield_values = $extrafields->getOptionalsFromPost("product_customer_price");
|
||||
$extralabels = !empty($extrafields->attributes["product_customer_price"]['label']) ? $extrafields->attributes["product_customer_price"]['label'] : '';
|
||||
$extrafield_values = $extrafields->getOptionalsFromPost("product_customer_price");
|
||||
if (!empty($extralabels) && is_array($extralabels)) {
|
||||
$productcustomerprice = new ProductCustomerPrice($db);
|
||||
$res = $productcustomerprice->fetch($prodcustprice->id);
|
||||
@@ -392,7 +393,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT
|
||||
// Price
|
||||
print '<tr><td width="20%">';
|
||||
$text = $langs->trans('SellingPrice');
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1);
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 'help');
|
||||
print '</td><td>';
|
||||
print '<input name="price" size="10" value="'.GETPOSTINT('price').'">';
|
||||
print '</td></tr>';
|
||||
@@ -400,7 +401,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT
|
||||
// Price minimum
|
||||
print '<tr><td>';
|
||||
$text = $langs->trans('MinPrice');
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1);
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 'help');
|
||||
print '<td><input name="price_min" size="10" value="'.GETPOSTINT('price_min').'">';
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -485,7 +486,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT
|
||||
// Price
|
||||
print '<tr><td>';
|
||||
$text = $langs->trans('SellingPrice');
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1);
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 'help');
|
||||
print '</td><td>';
|
||||
if ($prodcustprice->price_base_type == 'TTC') {
|
||||
print '<input name="price" size="10" value="'.price($prodcustprice->price_ttc).'">';
|
||||
@@ -497,7 +498,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT
|
||||
// Price minimum
|
||||
print '<tr><td>';
|
||||
$text = $langs->trans('MinPrice');
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 1);
|
||||
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", getDolGlobalString('MAIN_MAX_DECIMALS_UNIT')), 1, 'help');
|
||||
print '</td><td>';
|
||||
if ($prodcustprice->price_base_type == 'TTC') {
|
||||
print '<input name="price_min" size="10" value="'.price($prodcustprice->price_min_ttc).'">';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2021 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -242,7 +242,7 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
|
||||
print '<td align="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
Reference in New Issue
Block a user