From 7e0af928132c8eda2f25943b9a316e8ddf6f9a41 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Wed, 18 Nov 2009 00:00:05 -0800 Subject: First draft of the admin panel for site design --- lib/form.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'lib') 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)) { @@ -119,6 +119,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 * -- cgit v1.2.3-54-g00ecf