summaryrefslogtreecommitdiff
path: root/lib/form.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-09 21:51:24 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-09 21:51:24 -0700
commit4df1ea49ec75ec9dd64bc8f58c01e64ea18bedc7 (patch)
tree91535b33cd2b62b0726821e4d217d587da7cd61b /lib/form.php
parentb3628b78448266fda2368f1317e70d1cca45ac17 (diff)
parented627bb4bd6424325478412055d295b185f9f662 (diff)
Merge branch '0.8.x' into userdesign
Conflicts: actions/designsettings.php
Diffstat (limited to 'lib/form.php')
-rw-r--r--lib/form.php16
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();