Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Advancedictionaries
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dolibarr extension
Advancedictionaries
Commits
05389b0f
Commit
05389b0f
authored
1 month ago
by
KHELIFA
Browse files
Options
Downloads
Plain Diff
Merge branch '2024_rc' into '2024'
FIX - Fix affichage de l'aide See merge request
!5
parents
5dde372f
84086701
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!5
FIX - Fix affichage de l'aide
Pipeline
#6033
failed
1 month ago
Stage: code_quality
Stage: build
Stage: release
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
ChangeLog.md
+5
-1
5 additions, 1 deletion
ChangeLog.md
VERSION
+1
-1
1 addition, 1 deletion
VERSION
class/actions_advancedictionaries.class.php
+80
-44
80 additions, 44 deletions
class/actions_advancedictionaries.class.php
core/tpl/dictionaries.tpl.php
+2
-2
2 additions, 2 deletions
core/tpl/dictionaries.tpl.php
with
88 additions
and
48 deletions
ChangeLog.md
+
5
−
1
View file @
05389b0f
...
...
@@ -3,6 +3,9 @@ Le format du fichier est basé sur [Tenez un ChangeLog](http://keepachangelog.co
## [Non Distribué]
## [14.0.13] - 10-03-2025
-
Fix affichage de l'aide
## [14.0.12] - 10-02-2025
-
Compatibilité V21
...
...
@@ -282,7 +285,8 @@ Le format du fichier est basé sur [Tenez un ChangeLog](http://keepachangelog.co
## [4.0.0] - 16-07-2018
-
Version initial.
[
Non Distribué
]:
https://github.com/OPEN-DSI/dolibarr_module_advancedictionaries/compare/14.0.12...HEAD
[
Non Distribué
]:
https://github.com/OPEN-DSI/dolibarr_module_advancedictionaries/compare/14.0.13...HEAD
[
14.0.13
]:
https://github.com/OPEN-DSI/dolibarr_module_advancedictionaries/commits/14.0.13
[
14.0.12
]:
https://github.com/OPEN-DSI/dolibarr_module_advancedictionaries/commits/14.0.12
[
14.0.11
]:
https://github.com/OPEN-DSI/dolibarr_module_advancedictionaries/commits/14.0.11
[
14.0.10
]:
https://github.com/OPEN-DSI/dolibarr_module_advancedictionaries/commits/14.0.10
...
...
This diff is collapsed.
Click to expand it.
VERSION
+
1
−
1
View file @
05389b0f
14.0.1
2
14.0.1
3
\ No newline at end of file
This diff is collapsed.
Click to expand it.
class/actions_advancedictionaries.class.php
+
80
−
44
View file @
05389b0f
...
...
@@ -25,54 +25,90 @@ dol_include_once('advancedictionaries/lib/advancedictionaries.lib.php');
class
ActionsAdvanceDictionaries
{
/**
* Overloading the updateSession function : replacing the parent's function with the one below
*
* @param array() $parameters Hook metadatas (context, etc...)
* @param CommonObject &$object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
* @param string &$action Current action (if set). Generally create or edit or null
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
* @return int < 0 on error, 0 on success, 1 to replace standard code
*/
/**
* @var DoliDB Database handler.
*/
public
$db
;
/**
* @var string Error
*/
public
$error
=
''
;
/**
* @var array Errors
*/
public
$errors
=
array
();
/**
* @var array Hook results. Propagated to $hookmanager->resArray for later reuse
*/
public
$results
=
array
();
/**
* @var string String displayed by executeHook() immediately after return
*/
public
$resprints
;
/**
* Constructor
*
* @param DoliDB $db Database handler
*/
public
function
__construct
(
$db
)
{
$this
->
db
=
$db
;
}
/**
* Overloading the updateSession function : replacing the parent's function with the one below
*
* @param array $parameters Hook metadatas (context, etc...)
* @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
* @param string $action Current action (if set). Generally create or edit or null
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
* @return int < 0 on error, 0 on success, 1 to replace standard code
*/
public
function
updateSession
(
$parameters
,
&
$object
,
&
$action
,
$hookmanager
)
{
return
$this
->
_redirection
(
$parameters
,
$object
,
$action
,
$hookmanager
);
}
{
return
$this
->
_redirection
(
$parameters
,
$object
,
$action
,
$hookmanager
);
}
/**
* Overloading the afterLogin function : replacing the parent's function with the one below
*
* @param
array
()
$parameters
Hook metadatas (context, etc...)
* @param
CommonObject
&
$object
The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
* @param
string
&$action
Current action (if set). Generally create or edit or null
* @param
HookManager
$hookmanager
Hook manager propagated to allow calling another hook
* @return
int
< 0 on error, 0 on success, 1 to replace standard code
*/
/**
* Overloading the afterLogin function : replacing the parent's function with the one below
*
* @param
array
$parameters
Hook metadatas (context, etc...)
* @param
CommonObject
$object
The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
* @param
string
$action
Current action (if set). Generally create or edit or null
* @param
HookManager
$hookmanager
Hook manager propagated to allow calling another hook
* @return
int
< 0 on error, 0 on success, 1 to replace standard code
*/
public
function
afterLogin
(
$parameters
,
&
$object
,
&
$action
,
$hookmanager
)
{
return
$this
->
_redirection
(
$parameters
,
$object
,
$action
,
$hookmanager
);
}
{
return
$this
->
_redirection
(
$parameters
,
$object
,
$action
,
$hookmanager
);
}
/**
* _redirection function
*
* @param array() $parameters Hook metadatas (context, etc...)
* @param CommonObject &$object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
* @param string &$action Current action (if set). Generally create or edit or null
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
* @return int < 0 on error, 0 on success, 1 to replace standard code
*/
private
function
_redirection
(
$parameters
,
&
$object
,
&
$action
,
$hookmanager
)
{
global
$conf
;
/**
* _redirection function
*
* @param array $parameters Hook metadatas (context, etc...)
* @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
* @param string $action Current action (if set). Generally create or edit or null
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
* @return int < 0 on error, 0 on success, 1 to replace standard code
*/
private
function
_redirection
(
$parameters
,
&
$object
,
&
$action
,
$hookmanager
)
{
global
$conf
;
// redirect old dictionaries page
if
(
!
empty
(
$conf
->
global
->
ADVANCEDICTIONARIES_REPLACE_OLD_DICTIONARIES_PAGE
)
&&
preg_match
(
'/\/admin\/dict.php/i'
,
$_SERVER
[
"PHP_SELF"
]))
{
$id
=
GETPOST
(
'id'
,
'int'
);
header
(
"Location: "
.
dol_buildpath
(
'/advancedictionaries/admin/dictionaries.php'
,
2
)
.
'?id='
.
$id
);
exit
;
}
// redirect old dictionaries page
if
(
!
empty
(
$conf
->
global
->
ADVANCEDICTIONARIES_REPLACE_OLD_DICTIONARIES_PAGE
)
&&
preg_match
(
'/\/admin\/dict.php/i'
,
$_SERVER
[
"PHP_SELF"
]))
{
$id
=
GETPOST
(
'id'
,
'int'
);
header
(
"Location: "
.
dol_buildpath
(
'/advancedictionaries/admin/dictionaries.php'
,
2
)
.
'?id='
.
$id
);
exit
;
}
return
0
;
// or return 1 to replace standard code
}
return
0
;
// or return 1 to replace standard code
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
core/tpl/dictionaries.tpl.php
+
2
−
2
View file @
05389b0f
...
...
@@ -119,9 +119,9 @@ if (isset($dictionary) && $dictionary->enabled) {
}
if
(
!
empty
(
$field
[
'help'
]))
{
if
(
preg_match
(
'/^http(s*):/i'
,
$field
[
'help'
]))
$input_label
.
=
'<a href="'
.
$field
[
'help'
]
.
'" target="_blank">'
.
$label
.
' '
.
img_help
(
1
,
$label
)
.
'</a>'
;
else
$input_label
.
=
$form
->
textwithpicto
(
$label
,
$langs
->
trans
(
$field
[
'help'
]));
// Tooltip on hover
else
$input_label
.
=
$form
->
textwithpicto
(
$label
,
$langs
->
trans
noentitiesnoconv
(
$field
[
'help'
]));
// Tooltip on hover
}
elseif
(
!
empty
(
$field
[
'help_button'
]))
{
$input_label
.
=
$form
->
textwithpicto
(
$label
,
$langs
->
trans
(
$field
[
'help_button'
]),
1
,
'help'
,
''
,
0
,
2
,
$fieldName
);
// Tooltip on click
$input_label
.
=
$form
->
textwithpicto
(
$label
,
$langs
->
trans
noentitiesnoconv
(
$field
[
'help_button'
]),
1
,
'help'
,
''
,
0
,
2
,
$fieldName
);
// Tooltip on click
$input_label
.
=
<<<SCRIPT
<script type="text/javascript">
jQuery(document).ready(function () {
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment