Fixed empty user search box (#171)

This commit is contained in:
Roman Kelesidis 2023-06-07 10:27:42 +07:00 committed by GitHub
parent 018cf11420
commit ebd04c1b5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -953,7 +953,7 @@ function username_search ($search_match)
}
if (!$username_list)
{
$username_list = '<option>'. $lang['NO_MATCH'] .'</option>';
$username_list = '<option value="">'. $lang['NO_MATCH'] .'</option>';
}
}
@ -970,4 +970,4 @@ function username_search ($search_match)
));
print_page('search.tpl', 'simple');
}
}

View File

@ -130,6 +130,10 @@
<script type="text/javascript">
function refresh_username(selected_username)
{
if (selected_username === '') {
return;
}
opener.document.forms['post'].{INPUT_NAME}.value = selected_username;
opener.focus();
window.close();
@ -165,4 +169,4 @@ function refresh_username(selected_username)
</form>
<!--========================================================================-->
<!-- ENDIF / TPL_SEARCH_USERNAME -->
<!-- ENDIF / TPL_SEARCH_USERNAME -->