54 |
* associated with a field. |
* associated with a field. |
55 |
* It is used during Confirmation |
* It is used during Confirmation |
56 |
* |
* |
|
* @param mixed - the value to look up |
|
57 |
* @return string - the text associated |
* @return string - the text associated |
58 |
*/ |
*/ |
59 |
function get_value_text($value) { |
function get_value_text() { |
60 |
|
$value = $this->get_value(); |
61 |
if ($value != NULL) { |
if ($value != NULL) { |
62 |
return $this->_text; |
return $this->_text; |
63 |
} else { |
} else { |
97 |
*/ |
*/ |
98 |
class FECheckBoxList extends FEMultiListBox { |
class FECheckBoxList extends FEMultiListBox { |
99 |
|
|
100 |
|
|
101 |
|
|
102 |
/** |
/** |
103 |
* This function builds and returns the |
* This function builds and returns the |
104 |
* form element object |
* form element object |
131 |
if (is_array($selected_values) && in_array($value, $selected_values)) |
if (is_array($selected_values) && in_array($value, $selected_values)) |
132 |
$attributes[] = "checked"; |
$attributes[] = "checked"; |
133 |
|
|
|
|
|
134 |
$checkbox = new INPUTtag($attributes); |
$checkbox = new INPUTtag($attributes); |
135 |
|
|
136 |
$js_action = "javascript:elements['" . $name . "'].checked=!elements['".$name."'].checked;"; |
if (isset($this->_disabled_items[$text])) { |
137 |
$a_attributes = array("href" => "javascript:void(0)", |
$checkbox->set_tag_attribute("disabled"); |
138 |
"onClick" => $js_action); |
$a = $text; |
139 |
$a = new Atag($a_attributes, htmlspecialchars($text), FALSE); |
} else { |
140 |
|
$js_action = "javascript:elements['" . $name . "'].checked=!elements['".$name."'].checked;"; |
141 |
|
$a_attributes = array("href" => "javascript:void(0)", |
142 |
|
"onClick" => $js_action); |
143 |
|
$a = new Atag($a_attributes, htmlspecialchars($text), FALSE); |
144 |
|
} |
145 |
|
|
146 |
$check = container( $checkbox, $a ); |
$check = container( $checkbox, $a ); |
147 |
$check->set_collapse(); |
$check->set_collapse(); |
150 |
} |
} |
151 |
|
|
152 |
return $c; |
return $c; |
153 |
} |
} |
154 |
|
|
155 |
} |
} |
156 |
?> |
?> |