<commit_before>{% set user_group = core.getUser().getGroup() %}

{% if show_more is defined and show_more %}
	<script>

		$(document).ready(function() {
		    let filterOption = '{{ more_data[0]["filter_option"] }}';
		    if (filterOption) {
                $('#' + filterOption).parent().removeClass("active");
                $('#' + filterOption).addClass("active");
            }
			let del = $('#delete');
			let merge  = $('#merge_thread');

			let deleteActive = typeof del[0] !== typeof undefined && del[0].hasAttribute('class') && del.attr('class').includes('active');
			let deleteMerge  = merge[0].hasAttribute('class')  && merge.attr('class').includes('active');

			if(('{{ more_data[0]["filter_option"] }}' === 'tree' && !deleteActive && !deleteMerge) || {{is_full_threads_page is defined ? is_full_threads_page : ''}}) {
				$('#dropdownLabel').removeClass("active");
			}
			else {
				$('#dropdownLabel').addClass("active");
			}

		 });

	</script>
{% endif %}

<div class="forum_bar">

	<div class="row">

	<div class="col-8">

		{% if thread_exists %}

			<form id="search_block" method="post" action="{{ search_url }}">
				<input type='hidden' name="csrf_token" value="{{ csrf_token }}" />
			<div class="row">
				<div class="col-6">
					<input type="text" placeholder="Search here..." name="search_content" id="search_content" onchange="$(this).val($(this).val().trim())" required aria-label="Forum Search Input Box" />
				</div>
				<div class="col-5">
					<button type="submit" name="search" title="Submit search" class="btn btn-primary">
		  				Search
					</button>

					{% for button in forum_bar_buttons_left %}
						{% if user_group <= button.required_rank %}<commit_msg>[Bugfix:Forum] Remove dead code causing JS syntax issue (#8380)<commit_after>{% set user_group = core.getUser().getGroup() %}

{% if show_more is defined and show_more %}
	<script>
		$(document).ready(function() {
		    let filterOption = '{{ more_data[0]["filter_option"] }}';
		    if (filterOption) {
                $('#' + filterOption).parent().removeClass("active");
                $('#' + filterOption).addClass("active");
            }
		 });
	</script>
{% endif %}

<div class="forum_bar">

	<div class="row">

	<div class="col-8">

		{% if thread_exists %}

			<form id="search_block" method="post" action="{{ search_url }}">
				<input type='hidden' name="csrf_token" value="{{ csrf_token }}" />
			<div class="row">
				<div class="col-6">
					<input type="text" placeholder="Search here..." name="search_content" id="search_content" onchange="$(this).val($(this).val().trim())" required aria-label="Forum Search Input Box" />
				</div>
				<div class="col-5">
					<button type="submit" name="search" title="Submit search" class="btn btn-primary">
		  				Search
					</button>

					{% for button in forum_bar_buttons_left %}
						{% if user_group <= button.required_rank %}
{'fraction_non_alphanumeric': 0.20192970365265334, 'fraction_numerical': 0.005513439007580979, 'mean_word_length': 3.7203252032520324, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6873254', 'n_tokens_mistral': 1054, 'n_tokens_neox': 891, 'n_words': 186}