{#
/**
 * Shortfreetext, location map service style, item Html
 *
 * @var $freeTextId                  answer{$ia[1]}
 * @var $extraclass
 * @var $name                        $ia[1]
 * @var $value                       $_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$ia[1]]}
 * @var $kpclass
 * @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="{{ coreClass }} {{ extraclass }}" row" role="group" aria-labelledby="ls-question-text-{{ basename }}">
    <!-- Input Text Location -->
    <div class="col-sm-12" >
            <input
                class="text location {{ kpclass }}"
                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-xs-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-sm-12">
            {{ question_text_help }}
        </div>
    {% endif %}

</div>
