aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2011-05-23 10:32:09 +0300
committerFilipp Lepalaan <filipp@mac.com>2011-05-23 10:32:09 +0300
commit00eeae9fadc2c505f6c659bc68079584a5a63ff0 (patch)
tree30862b2870ab0337c7473c8054f5e64c5d42b942
parentdbbb551bcc3744bf09109fdb238f3e0f297775d4 (diff)
downloadmain-00eeae9fadc2c505f6c659bc68079584a5a63ff0.tar.gz
main-00eeae9fadc2c505f6c659bc68079584a5a63ff0.tar.bz2
main-00eeae9fadc2c505f6c659bc68079584a5a63ff0.zip
checkbox
-rw-r--r--MainView.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/MainView.php b/MainView.php
index edfc6e4..b5db3ca 100644
--- a/MainView.php
+++ b/MainView.php
@@ -48,6 +48,13 @@ class MainView
}
+ function checkbox($name, $value, $checked = FALSE, $params = NULL)
+ {
+ $checked = ($checked) ? ' checked="checked"' : '';
+ $html = '<input type="checkbox" name="'.$name.'" value="'.$value.'"'.$checked.'/>';
+ return $html;
+ }
+
// $this->mainView->form('/some/save')->
function action($action)
{