add some classes to inputs

darcs-hash:20080627145553-84dde-31e52074c9b8327bcebc46372e4ee8f86b77ea20.gz
This commit is contained in:
Evan Prodromou 2008-06-27 10:55:53 -04:00
parent 450d727458
commit 5b0d514f08

View File

@ -308,6 +308,7 @@ function common_input($id, $label, $value=NULL,$instructions=NULL) {
common_element('label', array('for' => $id), $label); common_element('label', array('for' => $id), $label);
$attrs = array('name' => $id, $attrs = array('name' => $id,
'type' => 'text', 'type' => 'text',
'class' => 'input_text',
'id' => $id); 'id' => $id);
if ($value) { if ($value) {
$attrs['value'] = htmlspecialchars($value); $attrs['value'] = htmlspecialchars($value);
@ -324,6 +325,7 @@ function common_checkbox($id, $label, $checked=false, $instructions=NULL, $value
common_element_start('p'); common_element_start('p');
$attrs = array('name' => $id, $attrs = array('name' => $id,
'type' => 'checkbox', 'type' => 'checkbox',
'class' => 'checkbox',
'id' => $id); 'id' => $id);
if ($value) { if ($value) {
$attrs['value'] = htmlspecialchars($value); $attrs['value'] = htmlspecialchars($value);
@ -354,6 +356,7 @@ function common_password($id, $label, $instructions=NULL) {
common_element('label', array('for' => $id), $label); common_element('label', array('for' => $id), $label);
$attrs = array('name' => $id, $attrs = array('name' => $id,
'type' => 'password', 'type' => 'password',
'class' => 'password',
'id' => $id); 'id' => $id);
common_element('input', $attrs); common_element('input', $attrs);
if ($instructions) { if ($instructions) {