diff options
author | Ciaran Gultnieks <ciaran@ciarang.com> | 2009-11-18 08:26:14 +0000 |
---|---|---|
committer | Ciaran Gultnieks <ciaran@ciarang.com> | 2009-11-18 08:26:14 +0000 |
commit | 158a1ea551770615d06e02d361ac6577967c9202 (patch) | |
tree | b514ba2dee78cca5a2b274a28c5a1ab6ee93d4f1 /lib/form.php | |
parent | 904baf4d27fa9490938f3e355c0fd43c3deeef7e (diff) | |
parent | 7ae45abfccd6ca56767369a5a663535e2633ea1d (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'lib/form.php')
-rw-r--r-- | lib/form.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/form.php b/lib/form.php index 87b7a5cba..868c986b9 100644 --- a/lib/form.php +++ b/lib/form.php @@ -67,7 +67,7 @@ class Form extends Widget { $attributes = array('id' => $this->id(), 'class' => $this->formClass(), - 'method' => 'post', + 'method' => $this->method(), 'action' => $this->action()); if (!empty($this->enctype)) { @@ -120,6 +120,18 @@ class Form extends Widget } /** + * HTTP method used to submit the form + * + * Defaults to post. Subclasses can override if they need to. + * + * @return string the method to use for submitting + */ + function method() + { + return 'post'; + } + + /** * Buttons for form actions * * Submit and cancel buttons (or whatever) |