summaryrefslogtreecommitdiff
path: root/lib/form.php
diff options
context:
space:
mode:
authorCiaran Gultnieks <ciaran@ciarang.com>2009-11-18 08:26:14 +0000
committerCiaran Gultnieks <ciaran@ciarang.com>2009-11-18 08:26:14 +0000
commit158a1ea551770615d06e02d361ac6577967c9202 (patch)
treeb514ba2dee78cca5a2b274a28c5a1ab6ee93d4f1 /lib/form.php
parent904baf4d27fa9490938f3e355c0fd43c3deeef7e (diff)
parent7ae45abfccd6ca56767369a5a663535e2633ea1d (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.php14
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)