<tal:block define="global current_tab_url string:admin_map_html" />
<metal:block use-macro="here/admin_pt/macros/page">

<metal:block fill-slot="tab_contents">

<form method="post" action="manageProperties">

<fieldset class="form-fieldset">
    <legend i18n:translate="">Map options</legend>

    <div class="field-inline">
        <label for="form-initial_address"
               i18n:translate="">Center address</label>
        <input type="text" size="70" name="initial_address:utf8:ustring"
               id="form-initial_address"
               tal:attributes="value here/initial_address" />
    </div>

    <div class="field-inline">
        <label for="form-initial_zoom"
               i18n:translate="">Zoom (1-17, blank means automatic)</label>
        <input type="text" size="3" name="initial_zoom:utf8:ustring"
               id="form-initial_zoom"
               tal:attributes="value here/initial_zoom|string:" />
    </div>

    <div class="field-inline">
        <span i18n:translate="">Portal map</span>
        <label for="form-map_height_px"
               i18n:translate="">height (px)</label>
        <input type="text" size="6" name="map_height_px:int"
               id="form-map_height_px"
               tal:attributes="value here/map_height_px" />
    </div>

    <div class="field-inline">
        <label for="form-cluster_points"
               i18n:translate="">Cluster points</label>
        <input type="checkbox" name="cluster_points:boolean"
               id="form-cluster_points"
               tal:attributes="checked here/cluster_points" />
    </div>

    <div class="field-inline">
        <span i18n:translate="">Object index map</span>
        <label for="form-objmap_height_px"
               i18n:translate="">height (px)</label>
        <input type="text" size="6" name="objmap_height_px:int"
               id="form-objmap_height_px"
               tal:attributes="value here/objmap_height_px" />

        <label for="form-objmap_width_px"
               i18n:translate="">width (px)</label>
        <input type="text" size="6" name="objmap_width_px:int"
               id="form-objmap_width_px"
               tal:attributes="value here/objmap_width_px" />

        <label for="form-objmap_zoom"
               i18n:translate="">zoom level (1-17)</label>
        <input type="text" size="6" name="objmap_zoom:int"
               id="form-objmap_zoom"
               tal:attributes="value here/objmap_zoom" />
    </div>

    <div class="field-inline">
        <label for="form-map_engine" i18n:translate="">Map engine</label>
        <select name="engine" id="form-map_engine">
            <option tal:repeat="engine options/all_engines"
                    tal:attributes="value engine/name;
                                    selected python:(engine['name'] ==
                                                     here.current_engine)"
                    tal:content="engine/label"
                    i18n:translate="" />
        </select>
    </div>

</fieldset>
<tal:block content="structure options/engine_config_html" />

<p><input type="submit" value="Save changes" i18n:attributes="value" /></p>

</form>

<fieldset class="form-fieldset">
    <legend i18n:translate="">Embed map</legend>
    <tal:block content="structure here/admin_map_embed_help" />
</fieldset>

</metal:block>

</metal:block>
