]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/form.php
tweak copyright headers on installer
[quix0rs-gnu-social.git] / lib / form.php
index 87b7a5cba91c42d0aea1b55ff62eea7a2e1d8712..f6501dc6daf699b0b190f748c459d34a064638f9 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
      *
@@ -169,4 +181,14 @@ class Form extends Widget
     {
         return 'form';
     }
+
+    function li()
+    {
+        $this->out->elementStart('li');
+    }
+
+    function unli()
+    {
+        $this->out->elementEnd('li');
+    }
 }