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
e7a02d77
Commit
e7a02d77
authored
9 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Revert commit
parent
8ecfca5a
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
+17
-17
17 additions, 17 deletions
htdocs/core/class/html.form.class.php
with
17 additions
and
17 deletions
htdocs/core/class/html.form.class.php
+
17
−
17
View file @
e7a02d77
...
...
@@ -64,7 +64,7 @@ class Form
*
* @param DoliDB $db Database handler
*/
public
function
__construct
(
DoliDB
$db
)
public
function
__construct
(
$db
)
{
$this
->
db
=
$db
;
}
...
...
@@ -82,7 +82,7 @@ class Form
* @param int $fieldrequired 1 if we want to show field as mandatory using the fieldrequired CSS.
* @return string HTML edit field
*/
public
static
function
editfieldkey
(
$text
,
$htmlname
,
$
value
,
$object
,
$perm
,
$typeofdata
=
'string'
,
$moreparam
=
''
,
$fieldrequired
=
0
)
function
editfieldkey
(
$text
,
$htmlname
,
$
preselected
,
$object
,
$perm
,
$typeofdata
=
'string'
,
$moreparam
=
''
,
$fieldrequired
=
0
)
{
global
$conf
,
$langs
;
...
...
@@ -136,7 +136,7 @@ class Form
* @param string $moreparam More param to add on a href URL
* @return string HTML edit field
*/
public
static
function
editfieldval
(
$text
,
$htmlname
,
$value
,
$object
,
$perm
,
$typeofdata
=
'string'
,
$editvalue
=
''
,
$extObject
=
null
,
$custommsg
=
null
,
$moreparam
=
''
)
function
editfieldval
(
$text
,
$htmlname
,
$value
,
$object
,
$perm
,
$typeofdata
=
'string'
,
$editvalue
=
''
,
$extObject
=
null
,
$custommsg
=
null
,
$moreparam
=
''
)
{
global
$conf
,
$langs
,
$db
;
...
...
@@ -148,7 +148,7 @@ class Form
// When option to edit inline is activated
if
(
!
empty
(
$conf
->
global
->
MAIN_USE_JQUERY_JEDITABLE
)
&&
!
preg_match
(
'/^select;|datehourpicker/'
,
$typeofdata
))
// TODO add jquery timepicker
{
$ret
.
=
self
::
editInPlace
(
$object
,
$value
,
$htmlname
,
$perm
,
$typeofdata
,
$editvalue
,
$extObject
,
$custommsg
);
$ret
.
=
$this
->
editInPlace
(
$object
,
$value
,
$htmlname
,
$perm
,
$typeofdata
,
$editvalue
,
$extObject
,
$custommsg
);
}
else
{
...
...
@@ -178,11 +178,11 @@ class Form
}
else
if
(
$typeofdata
==
'day'
||
$typeofdata
==
'datepicker'
)
{
$ret
.
=
self
::
select
D
ate
(
$value
,
$htmlname
,
0
,
0
,
1
,
'form'
.
$htmlname
,
1
,
0
,
1
);
$ret
.
=
$this
->
select
_d
ate
(
$value
,
$htmlname
,
0
,
0
,
1
,
'form'
.
$htmlname
,
1
,
0
,
1
);
}
else
if
(
$typeofdata
==
'dayhour'
||
$typeofdata
==
'datehourpicker'
)
{
$ret
.
=
self
::
select
D
ate
(
$value
,
$htmlname
,
1
,
1
,
1
,
'form'
.
$htmlname
,
1
,
0
,
1
);
$ret
.
=
$this
->
select
_d
ate
(
$value
,
$htmlname
,
1
,
1
,
1
,
'form'
.
$htmlname
,
1
,
0
,
1
);
}
else
if
(
preg_match
(
'/^select;/'
,
$typeofdata
))
{
...
...
@@ -259,7 +259,7 @@ class Form
* @param mixed $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage')
* @return string HTML edit in place
*/
private
static
function
editInPlace
(
$object
,
$value
,
$htmlname
,
$condition
,
$inputType
=
'textarea'
,
$editvalue
=
null
,
$extObject
=
null
,
$custommsg
=
null
)
private
function
editInPlace
(
$object
,
$value
,
$htmlname
,
$condition
,
$inputType
=
'textarea'
,
$editvalue
=
null
,
$extObject
=
null
,
$custommsg
=
null
)
{
global
$conf
;
...
...
@@ -492,10 +492,10 @@ class Form
* Generate select HTML to choose massaction
*
* @param string $selected Selected value
* @param
array
$arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action.
* @param
int
$arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action.
* @return string Select list
*/
public
static
function
selectMassAction
(
$selected
,
array
$arrayofaction
)
function
selectMassAction
(
$selected
,
$arrayofaction
)
{
global
$conf
,
$langs
,
$hookmanager
;
...
...
@@ -3270,7 +3270,7 @@ class Form
{
$more
.
=
'<tr><td>'
.
$input
[
'label'
]
.
'</td>'
;
$more
.
=
'<td colspan="2" align="left">'
;
$more
.
=
self
::
select
D
ate
(
$input
[
'value'
],
$input
[
'name'
],
0
,
0
,
0
,
''
,
1
,
0
,
1
);
$more
.
=
$this
->
select
_d
ate
(
$input
[
'value'
],
$input
[
'name'
],
0
,
0
,
0
,
''
,
1
,
0
,
1
);
$more
.
=
'</td></tr>'
.
"
\n
"
;
$formquestion
[]
=
array
(
'name'
=>
$input
[
'name'
]
.
'day'
);
$formquestion
[]
=
array
(
'name'
=>
$input
[
'name'
]
.
'month'
);
...
...
@@ -3622,7 +3622,7 @@ class Form
* @return void
* @see selectDate
*/
public
static
function
form
D
ate
(
$page
,
$selected
,
$htmlname
,
$displayhour
=
0
,
$displaymin
=
0
,
$nooutput
=
0
)
function
form
_d
ate
(
$page
,
$selected
,
$htmlname
,
$displayhour
=
0
,
$displaymin
=
0
,
$nooutput
=
0
)
{
global
$langs
;
...
...
@@ -3635,7 +3635,7 @@ class Form
$ret
.
=
'<input type="hidden" name="token" value="'
.
$_SESSION
[
'newtoken'
]
.
'">'
;
$ret
.
=
'<table class="nobordernopadding" cellpadding="0" cellspacing="0">'
;
$ret
.
=
'<tr><td>'
;
$ret
.
=
self
::
select
D
ate
(
$selected
,
$htmlname
,
$displayhour
,
$displaymin
,
1
,
'form'
.
$htmlname
,
1
,
0
,
1
);
$ret
.
=
$this
->
select
_d
ate
(
$selected
,
$htmlname
,
$displayhour
,
$displaymin
,
1
,
'form'
.
$htmlname
,
1
,
0
,
1
);
$ret
.
=
'</td>'
;
$ret
.
=
'<td align="left"><input type="submit" class="button" value="'
.
$langs
->
trans
(
"Modify"
)
.
'"></td>'
;
$ret
.
=
'</tr></table></form>'
;
...
...
@@ -4263,7 +4263,7 @@ class Form
* @return mixed Nothing or string if nooutput is 1
* @see formDate
*/
public
static
function
select
D
ate
(
$set_time
=
''
,
$prefix
=
're'
,
$h
=
0
,
$m
=
0
,
$empty
=
0
,
$form_name
=
""
,
$d
=
1
,
$addnowlink
=
0
,
$nooutput
=
0
,
$disabled
=
0
,
$fullday
=
''
,
$addplusone
=
''
,
$adddateof
=
''
)
function
select
_d
ate
(
$set_time
=
''
,
$prefix
=
're'
,
$h
=
0
,
$m
=
0
,
$empty
=
0
,
$form_name
=
""
,
$d
=
1
,
$addnowlink
=
0
,
$nooutput
=
0
,
$disabled
=
0
,
$fullday
=
''
,
$addplusone
=
''
,
$adddateof
=
''
)
{
global
$conf
,
$langs
;
...
...
@@ -5465,7 +5465,7 @@ class Form
* @param string $morehtmlright More html code to show before navigation arrows
* @return string Portion HTML avec ref + boutons nav
*/
public
static
function
showrefnav
(
$object
,
$paramid
,
$morehtml
=
''
,
$shownav
=
1
,
$fieldid
=
'rowid'
,
$fieldref
=
'ref'
,
$morehtmlref
=
''
,
$moreparam
=
''
,
$nodbprefix
=
0
,
$morehtmlleft
=
''
,
$morehtmlright
=
''
)
function
showrefnav
(
$object
,
$paramid
,
$morehtml
=
''
,
$shownav
=
1
,
$fieldid
=
'rowid'
,
$fieldref
=
'ref'
,
$morehtmlref
=
''
,
$moreparam
=
''
,
$nodbprefix
=
0
,
$morehtmlleft
=
''
,
$morehtmlright
=
''
)
{
global
$langs
,
$conf
;
...
...
@@ -5531,11 +5531,11 @@ class Form
/**
* Return HTML code to output a barcode
*
* @param
o
bject $object Object containing data to retrieve file name
* @param
O
bject $object Object containing data to retrieve file name
* @param int $width Width of photo
* @return string HTML code to output barcode
*/
public
static
function
showbarcode
(
$object
,
$width
=
100
)
function
showbarcode
(
&
$object
,
$width
=
100
)
{
global
$conf
;
...
...
@@ -5810,7 +5810,7 @@ class Form
* @param int $calljsfunction 0=default. 1=call function initCheckForSelect() after changing status of checkboxes
* @return string
*/
public
static
function
showFilterAndCheckAddButtons
(
$addcheckuncheckall
=
0
,
$cssclass
=
'checkforaction'
,
$calljsfunction
=
0
)
function
showFilterAndCheckAddButtons
(
$addcheckuncheckall
=
0
,
$cssclass
=
'checkforaction'
,
$calljsfunction
=
0
)
{
global
$conf
,
$langs
;
...
...
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