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
d86b86d8
Commit
d86b86d8
authored
14 years ago
by
Regis Houssin
Browse files
Options
Downloads
Patches
Plain Diff
Fix: remove deprecated code
parent
507c7bd9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/core/class/html.form.class.php
+45
-75
45 additions, 75 deletions
htdocs/core/class/html.form.class.php
with
45 additions
and
75 deletions
htdocs/core/class/html.form.class.php
+
45
−
75
View file @
d86b86d8
...
...
@@ -837,14 +837,15 @@ class Form
/**
* \brief Return list of products for customer in Ajax if Ajax activated or go to select_produits_do
* \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 on number of returned lines
* \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
* Return list of products for customer in Ajax if Ajax activated or go to select_produits_do
*
* @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 on number of returned lines
* @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
*/
function
select_produits
(
$selected
=
''
,
$htmlname
=
'productid'
,
$filtertype
=
''
,
$limit
=
20
,
$price_level
=
0
,
$status
=
1
,
$finished
=
2
)
{
...
...
@@ -864,17 +865,18 @@ class Form
}
/**
* \brief Return list of products for a customer
* \param selected Preselected product
* \param htmlname Name of select html
* \param filtertype Filter on product type (''=nofilter, 0=product, 1=service)
* \param limit Limite sur le nombre de lignes retournees
* \param price_level Level of price to show
* \param filterkey Filter on product
* \param status -1=Return all products, 0=Products not on sell, 1=Products on sell
* \param finished Filter on finished field: 2=No filter
* \param disableout Disable print output
* \return array Array of keys for json
* Return list of products for a customer
*
* @param selected Preselected product
* @param htmlname Name of select html
* @param filtertype Filter on product type (''=nofilter, 0=product, 1=service)
* @param limit Limite sur le nombre de lignes retournees
* @param price_level Level of price to show
* @param filterkey Filter on product
* @param status -1=Return all products, 0=Products not on sell, 1=Products on sell
* @param finished Filter on finished field: 2=No filter
* @param disableout Disable print output
* @return array Array of keys for json
*/
function
select_produits_do
(
$selected
=
''
,
$htmlname
=
'productid'
,
$filtertype
=
''
,
$limit
=
20
,
$price_level
=
0
,
$filterkey
=
''
,
$status
=
1
,
$finished
=
2
,
$disableout
=
0
)
{
...
...
@@ -947,26 +949,9 @@ class Form
{
$num
=
$this
->
db
->
num_rows
(
$result
);
$outselect
.
=
'<select class="flat" name="'
.
$htmlname
.
'"'
;
//if ($conf->use_javascript_ajax && $num && $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) $outselect.=' onchange="publish_selvalue(this);"';
$outselect
.
=
'>'
;
if
(
$conf
->
use_javascript_ajax
)
{
if
(
!
$num
)
{
$outselect
.
=
'<option value="0">-- '
.
$langs
->
trans
(
"NoProductMatching"
)
.
' --</option>'
;
}
else
{
$outselect
.
=
'<option value="0" selected="selected">-- '
.
$langs
->
trans
(
"MatchingProducts"
)
.
' --</option>'
;
}
}
else
{
$outselect
.
=
'<option value="0" selected="selected"> </option>'
;
}
$outselect
.
=
'<select class="flat" name="'
.
$htmlname
.
'">'
;
$outselect
.
=
'<option value="0" selected="selected"> </option>'
;
$i
=
0
;
while
(
$num
&&
$i
<
$num
)
{
...
...
@@ -1107,12 +1092,13 @@ class Form
}
/**
* \brief Return list of products for customer in Ajax if Ajax activated or go to select_produits_fournisseurs_do
* \param socid Id third party
* \param selected Preselected product
* \param htmlname Name of HTML Select
* \param filtertype Filter on product type (''=nofilter, 0=product, 1=service)
* \param filtre For a SQL filter
* Return list of products for customer in Ajax if Ajax activated or go to select_produits_fournisseurs_do
*
* @param socid Id third party
* @param selected Preselected product
* @param htmlname Name of HTML Select
* @param filtertype Filter on product type (''=nofilter, 0=product, 1=service)
* @param filtre For a SQL filter
*/
function
select_produits_fournisseurs
(
$socid
,
$selected
=
''
,
$htmlname
=
'productid'
,
$filtertype
=
''
,
$filtre
)
{
...
...
@@ -1131,16 +1117,17 @@ class Form
}
/**
* \brief Retourne la liste des produits de fournisseurs
* \param socid Id societe fournisseur (0 pour aucun filtre)
* \param selected Produit pre-selectionne
* \param htmlname Nom de la zone select
* \param filtertype Filter on product type (''=nofilter, 0=product, 1=service)
* \param filtre Pour filtre sql
* \param filterkey Filtre des produits
* \param status -1=Return all products, 0=Products not on sell, 1=Products on sell
* \param disableout Disable print output
* \return array Array of keys for json
* Retourne la liste des produits de fournisseurs
*
* @param socid Id societe fournisseur (0 pour aucun filtre)
* @param selected Produit pre-selectionne
* @param htmlname Nom de la zone select
* @param filtertype Filter on product type (''=nofilter, 0=product, 1=service)
* @param filtre Pour filtre sql
* @param filterkey Filtre des produits
* @param status -1=Return all products, 0=Products not on sell, 1=Products on sell
* @param disableout Disable print output
* @return array Array of keys for json
*/
function
select_produits_fournisseurs_do
(
$socid
,
$selected
=
''
,
$htmlname
=
'productid'
,
$filtertype
=
''
,
$filtre
=
''
,
$filterkey
=
''
,
$statut
=-
1
,
$disableout
=
0
)
{
...
...
@@ -1183,26 +1170,9 @@ class Form
$num
=
$this
->
db
->
num_rows
(
$result
);
$outselect
.
=
'<select class="flat" id="select'
.
$htmlname
.
'" name="'
.
$htmlname
.
'"'
;
//if ($conf->use_javascript_ajax && $num) $outselect.=' onchange="publish_selvalue(this);"';
$outselect
.
=
'>'
;
if
(
$conf
->
use_javascript_ajax
)
{
if
(
!
$num
)
{
$outselect
.
=
'<option value="0">-- '
.
$langs
->
trans
(
"NoProductMatching"
)
.
' --</option>'
;
}
else
{
$outselect
.
=
'<option value="0" selected="selected">-- '
.
$langs
->
trans
(
"MatchingProducts"
)
.
' --</option>'
;
}
}
else
{
if
(
!
$selected
)
$outselect
.
=
'<option value="0" selected="selected"> </option>'
;
else
$outselect
.
=
'<option value="0"> </option>'
;
}
$outselect
.
=
'<select class="flat" id="select'
.
$htmlname
.
'" name="'
.
$htmlname
.
'">'
;
if
(
!
$selected
)
$outselect
.
=
'<option value="0" selected="selected"> </option>'
;
else
$outselect
.
=
'<option value="0"> </option>'
;
$i
=
0
;
while
(
$i
<
$num
)
...
...
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