<hr class="formRowSep" />

<xf:numberboxrow name="options[limit]" value="{$options.limit}" min="1"
	label="{{ phrase('maximum_entries') }}" />

<xf:selectrow name="options[node_ids][]" value="{{ $options.node_ids ?: '' }}" multiple="multiple" size="7"
	label="{{ phrase('forum_limit') }}"
	explain="{{ phrase('only_include_posts_in_selected_forums') }}">

	<xf:option value="">{{ phrase('all_forums') }}</xf:option>
	<xf:foreach loop="$nodeTree.getFlattened(0)" value="$treeEntry">
		<xf:option value="{$treeEntry.record.node_id}" disabled="{{ $treeEntry.record.node_type_id != 'Forum' }}">
			{{ repeat('&nbsp;&nbsp;', $treeEntry.depth)|raw }} {$treeEntry.record.title}
		</xf:option>
	</xf:foreach>
</xf:selectrow>

<xf:checkboxrow label="{{ phrase('only_include_posts_with') }}..." rowtype="noColon">
	<xf:option label="{{ phrase('reaction_score_at_least_x') }}" selected="$options.min_reaction_score !== null">
		<xf:numberbox name="options[min_reaction_score]" value="{{ $options.min_reaction_score ?: 0 }}" />
	</xf:option>
</xf:checkboxrow>

<xf:formrow rowtype="input"
	label="{{ phrase('sort') }}">

	<div class="inputPair">
		<xf:select name="options[order]" value="{$options.order}">
			<xf:options source="{$sortOrders}" />
		</xf:select>
		<xf:select name="options[direction]" value="{$options.direction}">
			<xf:option value="ASC">{{ phrase('ascending') }}</xf:option>
			<xf:option value="DESC">{{ phrase('descending') }}</xf:option>
		</xf:select>
	</div>
</xf:formrow>