{#
/**
 * Shortfreetext, location map service style, item Html
 *
 * @var $freeTextId                  answer{$ia[1]}
 * @var $extraclass
 * @var $name                        $ia[1]
 * @var $value                       $_SESSION['responses_'.Yii::app()->getConfig('surveyID')][$ia[1]]}
 * @var $currentLocation
 * @var $strBuild
 * @var $checkconditionFunction      $checkconditionFunction(this.value, this.name, this.type)
 * @var $location_mapservice         $aQuestionAttributes['location_mapservice']
 * @var $location_mapzoom            $aQuestionAttributes['location_mapzoom']
 * @var $location_mapheight          $aQuestionAttributes['location_mapheight']
 * @var $questionHelp
 * @var $question_text_help          $question_text['help']
 */
#}

{{ registerScript('MAP_VARS_'~basename,  
    " var zoom = zoom || [];
    zoom['"~name~"'] = "~location_mapzoom~";"
    , "POS_END") }}


<div class="row {{ coreClass }} {{ extraclass }}" role="group" aria-labelledby="ls-question-text-{{ basename }}">
    <!-- Input Text Location -->
    <div class="col-12" >
            <input
                class="text location"
                type="text"
                size="20"
                name="{{ name }}_c"
                id="answer{{ name }}_c"
                value="{{ currentLocation }}"
                onchange="{{ checkconditionFunction }}"
                />
    </div>
    <!-- Map -->
    <div
        id="gmap_canvas_{{ name }}_c"
        class='col-12'
        style='height: {{ location_mapheight }}px'>
    </div>

    <!-- hidden input -->
    <input
        type="hidden"
        name="boycott_{{ name }}"
        id="boycott_{{ name }}"
        value = "{{ strBuild }}"
        />

    <input
        type="hidden"
        name="mapservice_{{ name }}"
        id="mapservice_{{ name }}"
        class="mapservice"
        value = "{{ location_mapservice }}"
        />

    <input
        type="hidden"
        name="{{ name }}"
        id="{{ freeTextId }}"
        value="{{ value }}"
        />

    {% if questionHelp %}
        <div class="questionhelp col-12">
            {{ question_text_help }}
        </div>
    {% endif %}

</div>
