diff options
author | Robin Millette <millette@controlyourself.ca> | 2009-05-26 21:20:04 -0400 |
---|---|---|
committer | Robin Millette <millette@controlyourself.ca> | 2009-05-26 21:20:04 -0400 |
commit | af700ea27703bbec5aa1078a84f9fd44c0260322 (patch) | |
tree | a227167390948f5791b8190435fbb9cfdbd0bc38 /lib/form.php | |
parent | 4edb1c6e0cfcaee256757ed20b4ff8d482158906 (diff) |
Let's you upload a file with a notice and have it shown with other attachments.
Diffstat (limited to 'lib/form.php')
-rw-r--r-- | lib/form.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/form.php b/lib/form.php index 5317df471..f872aef0b 100644 --- a/lib/form.php +++ b/lib/form.php @@ -52,6 +52,8 @@ require_once INSTALLDIR.'/lib/widget.php'; class Form extends Widget { + var $enctype = null; + /** * Show the form * @@ -63,11 +65,15 @@ class Form extends Widget function show() { - $this->out->elementStart('form', - array('id' => $this->id(), - 'class' => $this->formClass(), - 'method' => 'post', - 'action' => $this->action())); + $attributes = array('id' => $this->id(), + 'class' => $this->formClass(), + 'method' => 'post', + 'action' => $this->action()); + + if (!empty($this->enctype)) { + $attributes['enctype'] = $this->enctype; + } + $this->out->elementStart('form', $attributes); $this->out->elementStart('fieldset'); $this->formLegend(); $this->sessionToken(); |