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
adcc6dca
Commit
adcc6dca
authored
17 years ago
by
Unknown
Browse files
Options
Downloads
Patches
Plain Diff
Add: fonction select_propal_statut() qui affiche une liste de selection avec l'etat des propales
parent
684b70fa
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/html.form.class.php
+43
-0
43 additions, 0 deletions
htdocs/html.form.class.php
with
43 additions
and
0 deletions
htdocs/html.form.class.php
+
43
−
0
View file @
adcc6dca
...
@@ -1432,6 +1432,49 @@ class Form
...
@@ -1432,6 +1432,49 @@ class Form
}
}
print
'</select>'
;
print
'</select>'
;
}
}
/**
* \brief Retourne la liste droulante des diffrents tats d'une propal.
* Les valeurs de la liste sont les id de la table c_propalst
* \param selected etat pre-slctionn
*/
function
select_propal_statut
(
$selected
=
''
)
{
$sql
=
"SELECT id, code, label, active FROM "
.
MAIN_DB_PREFIX
.
"c_propalst"
;
$sql
.
=
" WHERE active = 1"
;
if
(
$this
->
db
->
query
(
$sql
))
{
print
'<select class="flat" name="propal_statut">'
;
print
'<option value=""> </option>'
;
$num
=
$this
->
db
->
num_rows
();
$i
=
0
;
if
(
$num
)
{
while
(
$i
<
$num
)
{
$obj
=
$this
->
db
->
fetch_object
();
if
(
$selected
==
$obj
->
id
)
{
print
'<option value="'
.
$obj
->
id
.
'" selected="true">'
;
}
else
{
print
'<option value="'
.
$obj
->
id
.
'">'
;
}
// Si traduction existe, on l'utilise, sinon on prend le libell par dfaut
//print ($langs->trans("Civility".$obj->code)!="Civility".$obj->code ? $langs->trans("Civility".$obj->code) : ($obj->civilite!='-'?$obj->civilite:''));
print
$obj
->
label
;
print
'</option>'
;
$i
++
;
}
}
print
'</select>'
;
}
else
{
dolibarr_print_error
(
$this
->
db
);
}
}
/**
/**
...
...
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