]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/form.php
First draft of the admin panel for site design
[quix0rs-gnu-social.git] / lib / form.php
index 87b7a5cba91c42d0aea1b55ff62eea7a2e1d8712..868c986b93b457097ba29c4316db682d23e9c956 100644 (file)
@@ -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
      *