diff --git a/core/date_api.php b/core/date_api.php index d70c2d983a..19b4d63845 100644 --- a/core/date_api.php +++ b/core/date_api.php @@ -230,10 +230,11 @@ function print_year_range_option_list( $p_year = 0, $p_start = 0, $p_end = 0 ) { * @param boolean $p_allow_blank Whether blank/null date is allowed. * @param integer $p_year_start First year to display in drop down. * @param integer $p_year_end Last year to display in drop down. + * @param string $p_input_css CSS classes to use with input fields * @return void * @access public */ -function print_date_selection_set( $p_name, $p_format, $p_date = 0, $p_default_disable = false, $p_allow_blank = false, $p_year_start = 0, $p_year_end = 0 ) { +function print_date_selection_set( $p_name, $p_format, $p_date = 0, $p_default_disable = false, $p_allow_blank = false, $p_year_start = 0, $p_year_end = 0, $p_input_css = "input-sm" ) { $t_chars = preg_split( '//', $p_format, -1, PREG_SPLIT_NO_EMPTY ); if( $p_date != 0 ) { $t_date = preg_split( '/-/', date( 'Y-m-d', $p_date ), -1, PREG_SPLIT_NO_EMPTY ); @@ -252,25 +253,25 @@ function print_date_selection_set( $p_name, $p_format, $p_date = 0, $p_default_d foreach( $t_chars as $t_char ) { if( strcmp( $t_char, 'M' ) == 0 ) { - echo ''; echo $t_blank_line; print_month_option_list( $t_date[1] ); echo '' . "\n"; } if( strcmp( $t_char, 'm' ) == 0 ) { - echo ''; echo $t_blank_line; print_month_option_list( $t_date[1] ); echo '' . "\n"; } if( strcasecmp( $t_char, 'D' ) == 0 ) { - echo ''; echo $t_blank_line; print_day_option_list( $t_date[2] ); echo '' . "\n"; } if( strcasecmp( $t_char, 'Y' ) == 0 ) { - echo ''; echo $t_blank_line; print_year_range_option_list( $t_date[0], $p_year_start, $p_year_end ); echo '' . "\n"; diff --git a/core/filter_form_api.php b/core/filter_form_api.php index f6093db70a..c5260cfc6d 100644 --- a/core/filter_form_api.php +++ b/core/filter_form_api.php @@ -188,7 +188,7 @@ function print_filter_reporter_id( array $p_filter = null ) { $p_filter = $g_filter; } ?> - name="[]"> + name="[]"> - name="[]"> + name="[]"> @@ -444,7 +444,7 @@ function print_filter_platform( array $p_filter = null ) { } ?> - name="[]"> + name="[]"> @@ -505,7 +505,7 @@ function print_filter_os_build( array $p_filter = null ) { } ?> - name="[]"> + @@ -560,7 +560,7 @@ function print_filter_show_severity( array $p_filter = null ) { $p_filter = $g_filter; } ?> - name="[]"> + @@ -615,7 +615,7 @@ function print_filter_show_resolution( array $p_filter = null ) { $p_filter = $g_filter; } ?> - name="[]"> + @@ -670,7 +670,7 @@ function print_filter_show_status( array $p_filter = null ) { $p_filter = $g_filter; } ?> - name="[]"> + @@ -729,7 +729,7 @@ function print_filter_hide_status( array $p_filter = null ) { $p_filter = $g_filter; } ?> - name="[]"> + @@ -786,7 +786,7 @@ function print_filter_show_build( array $p_filter = null ) { $p_filter = $g_filter; } ?> - name="[]"> + name="[]"> @@ -903,7 +903,7 @@ function print_filter_show_fixed_in_version( array $p_filter = null ) { $p_filter = $g_filter; } ?> - name="[]"> + name="[]"> @@ -1018,7 +1018,7 @@ function print_filter_show_priority( array $p_filter = null ) { $p_filter = $g_filter; } ?> - name="[]"> + @@ -1073,7 +1073,7 @@ function print_filter_show_profile( array $p_filter = null ) { $p_filter = $g_filter; } ?> - name="[]"> + @@ -1103,7 +1103,7 @@ function print_filter_per_page( array $p_filter = null ) { $p_filter = $g_filter; } ?> - + - - /> + - + - +
@@ -1319,17 +1322,17 @@ function print_filter_do_filter_by_date( $p_hide_checkbox = false, array $p_filt $t_chars = preg_split( '//', config_get( 'short_date_format' ), -1, PREG_SPLIT_NO_EMPTY ); foreach( $t_chars as $t_char ) { if( strcasecmp( $t_char, 'M' ) == 0 ) { - echo ''; print_month_option_list( $p_filter[FILTER_PROPERTY_DATE_SUBMITTED_START_MONTH] ); print "\n"; } if( strcasecmp( $t_char, 'D' ) == 0 ) { - echo ''; print_day_option_list( $p_filter[FILTER_PROPERTY_DATE_SUBMITTED_START_DAY] ); print "\n"; } if( strcasecmp( $t_char, 'Y' ) == 0 ) { - echo ''; print_year_option_list( $p_filter[FILTER_PROPERTY_DATE_SUBMITTED_START_YEAR] ); print "\n"; } @@ -1347,17 +1350,17 @@ function print_filter_do_filter_by_date( $p_hide_checkbox = false, array $p_filt $t_chars = preg_split( '//', config_get( 'short_date_format' ), -1, PREG_SPLIT_NO_EMPTY ); foreach( $t_chars as $t_char ) { if( strcasecmp( $t_char, 'M' ) == 0 ) { - echo ''; print_month_option_list( $p_filter[FILTER_PROPERTY_DATE_SUBMITTED_END_MONTH] ); print "\n"; } if( strcasecmp( $t_char, 'D' ) == 0 ) { - echo ''; print_day_option_list( $p_filter[FILTER_PROPERTY_DATE_SUBMITTED_END_DAY] ); print "\n"; } if( strcasecmp( $t_char, 'Y' ) == 0 ) { - echo ''; print_year_option_list( $p_filter[FILTER_PROPERTY_DATE_SUBMITTED_END_YEAR] ); print "\n"; } @@ -1437,7 +1440,7 @@ function print_filter_do_filter_by_last_updated_date( $p_hide_checkbox = false, $p_filter = $g_filter; } ?> -
+
@@ -1471,17 +1474,17 @@ function print_filter_do_filter_by_last_updated_date( $p_hide_checkbox = false, $t_chars = preg_split( '//', config_get( 'short_date_format' ), -1, PREG_SPLIT_NO_EMPTY ); foreach( $t_chars as $t_char ) { if( strcasecmp( $t_char, 'M' ) == 0 ) { - echo ''; print_month_option_list( $p_filter[FILTER_PROPERTY_LAST_UPDATED_START_MONTH] ); print "\n"; } if( strcasecmp( $t_char, 'D' ) == 0 ) { - echo ''; print_day_option_list( $p_filter[FILTER_PROPERTY_LAST_UPDATED_START_DAY] ); print "\n"; } if( strcasecmp( $t_char, 'Y' ) == 0 ) { - echo ''; print_year_option_list( $p_filter[FILTER_PROPERTY_LAST_UPDATED_START_YEAR] ); print "\n"; } @@ -1499,17 +1502,17 @@ function print_filter_do_filter_by_last_updated_date( $p_hide_checkbox = false, $t_chars = preg_split( '//', config_get( 'short_date_format' ), -1, PREG_SPLIT_NO_EMPTY ); foreach( $t_chars as $t_char ) { if( strcasecmp( $t_char, 'M' ) == 0 ) { - echo ''; print_month_option_list( $p_filter[FILTER_PROPERTY_LAST_UPDATED_END_MONTH] ); print "\n"; } if( strcasecmp( $t_char, 'D' ) == 0 ) { - echo ''; print_day_option_list( $p_filter[FILTER_PROPERTY_LAST_UPDATED_END_DAY] ); print "\n"; } if( strcasecmp( $t_char, 'Y' ) == 0 ) { - echo ''; print_year_option_list( $p_filter[FILTER_PROPERTY_LAST_UPDATED_END_YEAR] ); print "\n"; } @@ -1555,7 +1558,7 @@ function print_filter_relationship_type( array $p_filter = null ) { $c_reltype_value = -1; } relationship_list_box( $c_reltype_value, 'relationship_type', true ); - echo ''; + echo ''; } /** @@ -1595,8 +1598,8 @@ function print_filter_tag_string( array $p_filter = null ) { } ?> - - + - name="[]"> + 0 ? ' size="' . $t_size . '"' : '' ), ' value="', string_attribute( $p_filter[$p_field_name] ), '"/>'; break; case FILTER_TYPE_INT: - echo ' 0 ? ' size="' . $t_size . '"' : '' ), ' value="', (int)$p_filter[$p_field_name], '"/>'; break; case FILTER_TYPE_BOOLEAN: echo ''; - echo ''; + echo ' 0 ? ' size="' . $t_size . '"' : '' ), check_checked( (bool)$p_filter[$p_field_name] ) , '"/>'; + echo ''; + echo ''; break; case FILTER_TYPE_MULTI_STRING: - echo ' 0 ? ' size="' . $t_size . '"' : '' ), ' name="', + echo ' 0 ? ' size="' . $t_size . '"' : '' ), ' name="', string_attribute( $p_field_name ), '[]">', ''; @@ -1907,11 +1913,11 @@ function print_filter_custom_field( $p_field_id, array $p_filter = null ) { break; case CUSTOM_FIELD_TYPE_TEXTAREA: - echo ''; + echo ''; break; default: - echo ''; + echo ''; foreach( $t_shown_fields as $t_key => $t_val ) { echo ''; } echo ''; - echo ''; foreach( $t_shown_dirs as $t_key => $t_val ) { echo '\n\n\n
' . "\n"; - echo '' . "\n"; echo '' . "\n"; @@ -2161,9 +2167,9 @@ function print_filter_custom_field_date( $p_field_id, array $p_filter = null ) { echo "
"; - print_date_selection_set( 'custom_field_' . $p_field_id . '_start', config_get( 'short_date_format' ), $t_start, $t_start_disable, false, $t_sel_start_year, $t_sel_end_year ); + print_date_selection_set( 'custom_field_' . $p_field_id . '_start', config_get( 'short_date_format' ), $t_start, $t_start_disable, false, $t_sel_start_year, $t_sel_end_year, "input-xs" ); print "
"; - print_date_selection_set( 'custom_field_' . $p_field_id . '_end', config_get( 'short_date_format' ), $t_end, $t_end_disable, false, $t_sel_start_year, $t_sel_end_year ); + print_date_selection_set( 'custom_field_' . $p_field_id . '_end', config_get( 'short_date_format' ), $t_end, $t_end_disable, false, $t_sel_start_year, $t_sel_end_year, "input-xs" ); print "
"; } @@ -2216,7 +2222,7 @@ function print_filter_project_id( array $p_filter = null ) { } ?> - name="[]"> diff --git a/css/ace-mantis.css b/css/ace-mantis.css index 90ca027415..fcd54505f8 100644 --- a/css/ace-mantis.css +++ b/css/ace-mantis.css @@ -254,6 +254,11 @@ select.input-xs option, select.form-control.input-xs option { padding: 0px 2px !important; } +select[disabled] { + background-color: #eee !important; + color: #848484 !important; +} + textarea.input-xs, select.input-xs[multiple] { height: auto; } diff --git a/js/common.js b/js/common.js index a5672ddcb7..358a5e113f 100644 --- a/js/common.js +++ b/js/common.js @@ -275,8 +275,8 @@ $(document).ready( function() { /* Handle standard filter date fields */ $(document).on('change', '.js_switch_date_inputs_trigger', function() { - $(this).closest('.js_switch_date_inputs_container') - .find(':input').not(this) + $(this).closest('table') + .find('select') .prop('disabled', !$(this).prop('checked')); }); diff --git a/manage_filter_edit_page.php b/manage_filter_edit_page.php index 1ba8446297..ae0a8f42d5 100644 --- a/manage_filter_edit_page.php +++ b/manage_filter_edit_page.php @@ -92,7 +92,7 @@
-
+ diff --git a/view_filters_page.php b/view_filters_page.php index debdaba0f3..5d7c041931 100644 --- a/view_filters_page.php +++ b/view_filters_page.php @@ -101,7 +101,7 @@
- +