add jabber library and use it

darcs-hash:20080624001523-34904-8d0c052f12301d86aeb9107149b34f22c94da1c4.gz
This commit is contained in:
Evan Prodromou
2008-06-23 20:15:23 -04:00
parent ae40dfe842
commit 63dcbe1e6e
4 changed files with 56 additions and 12 deletions

View File

@@ -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',