Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor 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
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
106d0b08
Commit
106d0b08
authored
14 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Parameter PRODUIT_USE_SEARCH_TO_SELECT wa not used
parent
a2513983
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/core/class/html.form.class.php
+3
-3
3 additions, 3 deletions
htdocs/core/class/html.form.class.php
htdocs/lib/ajax.lib.php
+5
-3
5 additions, 3 deletions
htdocs/lib/ajax.lib.php
with
8 additions
and
6 deletions
htdocs/core/class/html.form.class.php
+
3
−
3
View file @
106d0b08
...
...
@@ -838,7 +838,7 @@ class Form
* \param selected Preselected products
* \param htmlname Name of HTML seletc field (must be unique in page)
* \param filtertype Filter on product type (''=nofilter, 0=product, 1=service)
* \param limit Limit
sur le
n
o
mb
re de lignes
ret
o
urnees
* \param limit Limit
on
n
u
mb
er of
returne
d lin
es
* \param price_level Level of price to show
* \param status -1=Return all products, 0=Products not on sell, 1=Products on sell
* \param finished 2=all, 1=finished, 0=raw material
...
...
@@ -850,7 +850,7 @@ class Form
if
(
$conf
->
global
->
PRODUIT_USE_SEARCH_TO_SELECT
)
{
// mode=1 means customers products
print
ajax_autocompleter
(
''
,
$htmlname
,
DOL_URL_ROOT
.
'/product/ajaxproducts.php'
,
'outjson=1&price_level='
.
$price_level
.
'&type='
.
$filtertype
.
'&mode=1&status='
.
$status
.
'&finished='
.
$finished
);
print
ajax_autocompleter
(
''
,
$htmlname
,
DOL_URL_ROOT
.
'/product/ajaxproducts.php'
,
'outjson=1&price_level='
.
$price_level
.
'&type='
.
$filtertype
.
'&mode=1&status='
.
$status
.
'&finished='
.
$finished
,
$conf
->
global
->
PRODUIT_USE_SEARCH_TO_SELECT
);
print
$langs
->
trans
(
"RefOrLabel"
)
.
' : <input type="text" size="20" name="search_'
.
$htmlname
.
'" id="search_'
.
$htmlname
.
'">'
;
print
'<br>'
;
}
...
...
@@ -1117,7 +1117,7 @@ class Form
if
(
$conf
->
global
->
PRODUIT_USE_SEARCH_TO_SELECT
)
{
// mode=2 means suppliers products
print
ajax_autocompleter
(
''
,
$htmlname
,
DOL_URL_ROOT
.
'/product/ajaxproducts.php'
,
'outjson=1&price_level='
.
$price_level
.
'&type='
.
$filtertype
.
'&mode=2&status='
.
$status
.
'&finished='
.
$finished
);
print
ajax_autocompleter
(
''
,
$htmlname
,
DOL_URL_ROOT
.
'/product/ajaxproducts.php'
,
'outjson=1&price_level='
.
$price_level
.
'&type='
.
$filtertype
.
'&mode=2&status='
.
$status
.
'&finished='
.
$finished
,
$conf
->
global
->
PRODUIT_USE_SEARCH_TO_SELECT
);
print
$langs
->
trans
(
"RefOrLabel"
)
.
' : <input type="text" size="16" name="search_'
.
$htmlname
.
'" id="search_'
.
$htmlname
.
'">'
;
print
'<br>'
;
}
...
...
This diff is collapsed.
Click to expand it.
htdocs/lib/ajax.lib.php
+
5
−
3
View file @
106d0b08
...
...
@@ -26,9 +26,11 @@
/**
* Get value of field, do Ajax process and return result
* @param htmlname nom et id du champ
* @param url chemin du fichier de reponse : /chemin/fichier.php
* Get value of an HTML field, do Ajax process and show result
* @param htmlname HTML name of input field
* @param url Url for request: /chemin/fichier.php
* @param option More parameters on URL request
* @param minLength Minimum number of chars to trigger tha Ajax search
* @return string script complet
*/
function
ajax_autocompleter
(
$selected
=
''
,
$htmlname
,
$url
,
$option
=
''
,
$minLength
=
2
)
...
...
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