summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlezvous.ca>2008-06-23 20:15:23 -0400
committerEvan Prodromou <evan@controlezvous.ca>2008-06-23 20:15:23 -0400
commit63dcbe1e6e4dc49de9ce9be82421c043cc751007 (patch)
treeb289596fb22b1e2fef21e27160ef20de2eed9e6a /lib/util.php
parentae40dfe842c034263a49e2dbbde5c19ac9515c19 (diff)
add jabber library and use it
darcs-hash:20080624001523-34904-8d0c052f12301d86aeb9107149b34f22c94da1c4.gz
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php
index d990b8e1f..7a9bed2c9 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -319,6 +319,25 @@ function common_input($id, $label, $value=NULL,$instructions=NULL) {
common_element_end('p');
}
+function common_checkbox($id, $label, $value='true',
+ $instructions=NULL)
+{
+ common_element_start('p');
+ $attrs = array('name' => $id,
+ 'type' => 'checkbox',
+ 'id' => $id,
+ 'value' => $value);
+ if ($value) {
+ $attrs['value'] = htmlspecialchars($value);
+ }
+ common_element('input', $attrs);
+ common_element('label', array('for' => $id), $label);
+ if ($instructions) {
+ common_element('span', 'input_instructions', $instructions);
+ }
+ common_element_end('p');
+}
+
function common_hidden($id, $value) {
common_element('input', array('name' => $id,
'type' => 'hidden',