{% if translation is defined %}
{% set work = translation.work %}
{% endif %}
{% if multicolumn is not defined %}
{% set multicolumn = false %}
{% endif %}
{% if work.swedenborgType is not null %}
{% set nColStr = textbox_position %}
{% if column_num is defined %}
{% set nColStr = column_num ~ textbox_position %}
{% endif %}
<span class="swedenborg-goto noprint" >
<form style="margin:0px;padding-top:3px;" action="{{ path('swedenborg_goto') }}" method="get" id="frmGoTo{{ nColStr }}" {% if multicolumn %}data-multicolumn-navtype="ss"{% endif %} >
{% if multicolumn %}
{# Assemble most of the URL we should forward this to, but with the section number replaced with '@@@@@@' so our JavaScript can easily perform a substitution #}
{% set aColumn1 = ref_column_spec|split('_') %}
{% set column_goto_pattern = (aColumn1[0]~'_'~aColumn1[1]~'_@@@@@@') %}
<input type="hidden" name="gotoPattern" value="{{ path(multicolumn_path, multicolumn_route_params|merge({('column'~column_num~'Details'): column_goto_pattern}) ) }}" />
{% else %}
{% if (nav_mode is not defined and translation is defined and translation is not null) or (nav_mode is defined and nav_mode == 'translation') %}
<input type="hidden" name="translation" value="{{ translation.url }}" />
{% else %}
<input type="hidden" id="swedenborg_navigator_work" name="work" value="{{ work.url }}" />
{% endif %}
{% if passage is defined and passage is not null %}
<input type="hidden" name="fromSection" value="{{ passage.swedenborgSection }}" />
{% endif %}
{% if bInFrame %}
<input type="hidden" name="inframe" value="1" />
<input type="hidden" name="division" value="{{ passage.getDivision().getUrl() }}" />
{% endif %}
{% if compare_to is defined and compare_to is not null %}
{% if compare_to2 is defined and compare_to2 is not null %}
<input type="hidden" id="swedenborg_navigator_compareTo" name="compareTo" value="{{ (use_quickview is defined and use_quickview == true) ? compare_to.id : compare_to.url~";;"~compare_to2.url }}" />
{% else %}
<input type="hidden" id="swedenborg_navigator_compareTo" name="compareTo" value="{{ (use_quickview is defined and use_quickview == true) ? compare_to.id : compare_to.url }}" />
{% endif %}
{% endif %}
{% endif %}
{# Need to use inline style to keep this from being way too big; size="5" won't work because it's overruled by the stylesheets #}
{% set section_box_number = (passage is defined and passage is not null) ? passage.swedenborgSection : '1' %}
{% set section_box_code = '<input class="form-control form-control-sm" style="display:inline;width:4em;text-align:right;" type="text" inputmode="numeric" autocomplete="off" id="swedenborg_navigator_section'~ nColStr ~'" name="section" onclick="onSec(this)" onblur="onGoToSection(' ~ nColStr ~ ',' ~ translation.id ~ ')" aria-label="section number" required="required" value="' ~ section_box_number ~ '" />' %}
<input type="hidden" id="current_section_num{{ nColStr }}" value="{{ section_box_number }}" />
{{ app.session.get('ui_str')["exposition.passage.goto"]|replace({'_9400_': section_box_code, '_9500_': work.divisions.last().passages.last().swedenborgSection})|raw }} <a id="btnGotoSection{{ nColStr }}" href="javascript:onGoToSection({{ nColStr }},{{ translation.id }})" alt="{{ app.session.get('ui_str')["exposition.passage.gobutton"] }}" title="{{ app.session.get('ui_str')["exposition.passage.gobutton"] }}"><i class="fa fa-bolt"></i></a>
</form>
</span>
<script>
$('[id="swedenborg_navigator_section{{ nColStr }}"]').keydown(function(event){
if(event.keyCode == 13){
event.preventDefault();
//onGoToSection({{ nColStr }},{{ translation.id }});
this.blur();
}
});
function onSec(vObj)
{
vObj.select();
}
</script>
{% endif %}