Skip to content

Commit

Permalink
Let browser handle required category field
Browse files Browse the repository at this point in the history
Proper empty default value on SELECT, lets the browser catch the error
without actually submitting the form.

Fixes #28618

(cherry picked from commit 407d0fd)
  • Loading branch information
dregad committed Jul 29, 2023
1 parent bb6738d commit 9128d26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/print_api.php
Expand Up @@ -772,7 +772,7 @@ function print_category_option_list( $p_category_id = 0, $p_project_id = null )
if( count( $t_cat_arr ) == 1 ) {
$p_category_id = (int) $t_cat_arr[0]['id'];
} else {
echo '<option value="0" disabled hidden';
echo '<option value="" disabled hidden';
check_selected( $p_category_id, 0 );
echo '>';
echo string_attribute( lang_get( 'select_option' ) );
Expand Down

0 comments on commit 9128d26

Please sign in to comment.