Skip to content

Commit

Permalink
Do not wrap inline items for custom field value lists
Browse files Browse the repository at this point in the history
Avoid wrapping of each individual item that is part of a custom
fields value list, displayed as inline inputs.

Fixes #20964

Signed-off-by: Damien Regad <dregad@mantisbt.org>
  • Loading branch information
cproensa authored and dregad committed May 31, 2016
1 parent ef2628e commit 1d3af0c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/cfdefs/cfdef_standard.php
Expand Up @@ -321,10 +321,11 @@ function cfdef_input_checkbox( array $p_field_def, $p_custom_field_value ) {
for( $i = 0; $i < count( $t_values ); $i++ ) {
$t_input_id = 'custom_field_' . $p_field_def['id'] . '_value_' . $i;
$t_input_name = 'custom_field_' . $p_field_def['id'] . '[]';
echo '<input id="$t_input_id" ' . helper_get_tab_index() . ' type="checkbox" name="' . $t_input_name . '" value="' . string_attribute( $t_values[$i] ) . '"';
echo '<label class="nowrap">';
echo '<input id="' . $t_input_id . '" ' . helper_get_tab_index() . ' type="checkbox" name="' . $t_input_name . '" value="' . string_attribute( $t_values[$i] ) . '"';
check_checked( $t_checked_values, $t_values[$i] );
echo " />\n";
echo '<label for="' . $t_input_id . '">' . string_display_line( $t_values[$i] ) . '</label>' . "\n";
echo string_display_line( $t_values[$i] ) . '</label>' . "\n";
}
}

Expand All @@ -347,10 +348,11 @@ function cfdef_input_radio( array $p_field_def, $p_custom_field_value ) {
for( $i = 0; $i < count( $t_values ); $i++ ) {
$t_input_id = 'custom_field_' . $p_field_def['id'] . '_value_' . $i;
$t_input_name = 'custom_field_' . $p_field_def['id'];
echo '<label class="nowrap">';
echo '<input id="' . $t_input_id . '" ' . helper_get_tab_index() . ' type="radio" name="' . $t_input_name . '" value="' . string_attribute( $t_values[$i] ) . '"';
check_checked( $t_checked_value, $t_values[$i] );
echo " />\n";
echo '<label for="' . $t_input_id . '">' . string_display_line( $t_values[$i] ) . '</label>' . "\n";
echo string_display_line( $t_values[$i] ) . '</label>' . "\n";
}
}

Expand Down

0 comments on commit 1d3af0c

Please sign in to comment.