You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

35 lines
1.5 KiB

<?xml version="1.0" encoding="UTF-8"?>
<!--Template for the widget-->
<templates>
<t t-name="GeoLocation" t-inherit="web.CharField">
<xpath expr="//input" position="replace">
<div class="o_input_map">
<input
class="o_input"
t-att-class="{'o_field_translate': isTranslatable}"
t-att-id="props.id"
t-att-type="props.isPassword ? 'password' : 'text'"
t-att-autocomplete="props.autocomplete or (props.isPassword ? 'new-password' : 'off')"
t-att-maxlength="maxLength > 0 and maxLength"
t-att-placeholder="props.placeholder"
t-ref="input"
readonly="1"
/>
<button type="button"
class="btn o_icon_button" id="open_map"
t-on-click="_OpenMapview">
<i class="fa fa-map-marker" role="img"
aria-label="Open map"
title="Open map"/>
</button>
</div>
</xpath>
<xpath expr="//div[hasclass('o_input_map')]" position="after">
<div class="input-group">
<!-- Container for the map preview -->
<div t-ref="mapContainer"
class="map-preview o_leaftlet_preview_open"/>
</div>
</xpath>
</t>
</templates>