Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
ab79429a
Commit
ab79429a
authored
Feb 24, 2009
by
Richard Mansfield
Browse files
Pieforms: Allow custom elements to include file inputs
parent
39311e2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/pieforms/pieform.php
View file @
ab79429a
...
...
@@ -323,7 +323,7 @@ class Pieform {/*{{{*/
}
// Force the form method to post if there is a file to upload
if
(
$element
[
'
type'
]
==
'file'
)
{
if
(
!
empty
(
$element
[
'
needsmultipart'
])
)
{
$this
->
fileupload
=
true
;
if
(
$this
->
data
[
'method'
]
==
'get'
)
{
$this
->
data
[
'method'
]
=
'post'
;
...
...
htdocs/lib/pieforms/pieform/elements/file.php
View file @
ab79429a
...
...
@@ -45,4 +45,9 @@ function pieform_element_file_get_value(Pieform $form, $element) {/*{{{*/
}
}
/*}}}*/
function
pieform_element_file_set_attributes
(
$element
)
{
/*{{{*/
$element
[
'needsmultipart'
]
=
true
;
return
$element
;
}
/*}}}*/
?>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment