diff options
Diffstat (limited to 'lib/form.php')
-rw-r--r-- | lib/form.php | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/lib/form.php b/lib/form.php index 87b7a5cba..f6501dc6d 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) @@ -169,4 +181,14 @@ class Form extends Widget { return 'form'; } + + function li() + { + $this->out->elementStart('li'); + } + + function unli() + { + $this->out->elementEnd('li'); + } } |