array() ); } public static function getOtherPropTypeListsHandled() { return array(); } public static function getDefaultCargoTypeLists() { return array( 'Enumeration' => array() ); } public static function getOtherCargoTypeListsHandled() { return array(); } public static function getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) { global $wgPageFormsTabIndex, $wgPageFormsFieldNum, $wgPageFormsShowOnSelect; $checkboxClass = ( $is_mandatory ) ? 'mandatoryField' : 'createboxInput'; $labelClass = 'checkboxLabel'; if ( array_key_exists( 'class', $other_args ) ) { $labelClass .= ' ' . $other_args['class']; } $input_prefix_id = "input_$wgPageFormsFieldNum"; // get list delimiter - default is comma if ( array_key_exists( 'delimiter', $other_args ) ) { $delimiter = $other_args['delimiter']; } else { $delimiter = ','; } $cur_values = PFValuesUtils::getValuesArray( $cur_value, $delimiter ); if ( ( $possible_values = $other_args['possible_values'] ) == null ) { $possible_values = array(); } $text = ''; $valIndex = 0; foreach ( $possible_values as $key => $possible_value ) { $valIndex ++; $input_id = $input_prefix_id . '_' . $valIndex; $cur_input_name = $input_name . '[' . $key . ']'; if ( array_key_exists( 'value_labels', $other_args ) && is_array( $other_args['value_labels'] ) && array_key_exists( $possible_value, $other_args['value_labels'] ) ) { $label = $other_args['value_labels'][$possible_value]; } else { $label = $possible_value; } $checkbox_attrs = array( 'id' => $input_id, 'tabindex' => $wgPageFormsTabIndex, 'class' => $checkboxClass, ); if ( in_array( $possible_value, $cur_values ) ) { $checkbox_attrs['checked'] = 'checked'; } if ( $is_disabled ) { $checkbox_attrs['disabled'] = 'disabled'; } $checkbox_input = Html::input( $cur_input_name, $possible_value, 'checkbox', $checkbox_attrs ); // Put a