function bfox_ref_url($ref_str, $post_id = 0)
{
    return add_query_arg('ref', urlencode(strtolower($ref_str)), bfox_tool_url());
}
?>

	<?php 
if (has_bfox_tool()) {
    ?>

		<header class="page-header">
			<h1 class="page-title">
				<?php 
    _e('Bible Tools');
    ?>
			</h1>
		</header>

		<form method="get" id="bible-form" action="<?php 
    echo esc_url(bfox_tool_url());
    ?>
" class="bfox-tool-form">
			<input type="text" id="bfox-tool-ref-global" class="field bfox-tool-ref" name="ref" placeholder="<?php 
    esc_attr_e('Search');
    ?>
" value="<?php 
    echo bfox_ref_str(BibleMeta::name_short);
    ?>
" />
			<select class="bfox-tool-name" id="bfox-tool-name-main" name="tool"><?php 
    echo bfox_tool_select_options();
    ?>
</select>
			<input type="submit" class="submit" value="<?php 
    esc_attr_e('Go');