addr in submit form

This commit is contained in:
Tykayn 2025-07-13 16:59:45 +02:00 committed by tykayn
parent 6707385ec9
commit e96acf4ab8
9 changed files with 309 additions and 273 deletions

View file

@ -4,12 +4,12 @@
{# {{ dump(commerce_overpass)}} #}
<div class="row mb-3">
<div class="col-12 col-md-2">
<label for="commerce_tag_value__addr:housenumber">{{'display.keys.contact:housenumber'|trans}}</label>
<input type="text" class="form-control text-end" name="commerce_tag_value__contact:housenumber" value="{% if commerce_overpass.tags_converted['contact:housenumber'] is defined %}{{ commerce_overpass.tags_converted['contact:housenumber'] }}{% endif %}">
<label for="commerce_tag_value__contact:housenumber">{{'display.keys.contact:housenumber'|trans}}</label>
<input type="text" class="form-control text-end" name="commerce_tag_value__contact:housenumber" value="{% if commerce_overpass.tags_converted['contact:housenumber'] is defined %}{{ commerce_overpass.tags_converted['contact:housenumber'] }}{% endif %}">
</div>
<div class="col-12 col-md-10">
<label for="commerce_tag_value__contact:street">{{'display.keys.contact:street'|trans}}</label>
<input type="text" class="form-control" name="commerce_tag_value__contact:street" value="{% if commerce_overpass.tags_converted['contact:street'] is defined %}{{ commerce_overpass.tags_converted['contact:street'] }}{% endif %}">
<input type="text" class="form-control" name="commerce_tag_value__contact:street" value="{% if commerce_overpass.tags_converted['contact:street'] is defined %}{{ commerce_overpass.tags_converted['contact:street'] }}{% endif %}">
</div>
</div>
</div>

View file

@ -1,22 +1,32 @@
<div id="clim" class="mb-4">
<h2 class="mb-3 title">
<label for="commerce_tag_value__clim">
<i class="bi bi-thermometer-half"></i>
{{'display.keys.clim'|trans}}</label>
</h2>
<div class="form-part mx-3">
<div class="form-check">
<input class="form-check-input" type="radio" name="commerce_tag_value__air_conditioning" id="clim_yes" value="yes" {% if commerce.tags_converted.air_conditioning is defined and commerce.tags_converted.air_conditioning == 'yes' %}checked{% endif %}>
<label class="form-check-label" for="clim_yes">Oui</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="commerce_tag_value__air_conditioning" id="clim_no" value="no" {% if commerce.tags_converted.air_conditioning is defined and commerce.tags_converted.air_conditioning == 'no' %}checked{% endif %}>
<label class="form-check-label" for="clim_no">Non</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="commerce_tag_value__air_conditioning" id="clim_unknown" value="" {% if commerce.tags_converted.air_conditioning is not defined or commerce.tags_converted.air_conditioning == '' %}checked{% endif %}>
<label class="form-check-label" for="clim_unknown">Je ne sais pas</label>
</div>
<div id="clim" class="mb-4 row">
<h2 class="mb-3 title col-12 col-sm-6">
<label for="commerce_tag_value__clim">
<i class="bi bi-thermometer-half"></i>
{{ 'display.keys.clim'|trans }}</label>
</h2>
<div class="form-part mx-3 col-12 col-sm-6">
<div class="form-check">
<input class="form-check-input" type="radio" name="commerce_tag_value__air_conditioning" id="clim_yes"
value="yes"
{% if commerce_overpass.tags_converted is defined and commerce_overpass.tags_converted.air_conditioning is defined and
commerce_overpass.tags_converted.air_conditioning == 'yes' %}checked{% endif %}
>
<label class="form-check-label" for="clim_yes">Oui</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="commerce_tag_value__air_conditioning" id="clim_no"
value="no"
{% if commerce_overpass.tags_converted is defined and commerce_overpass.tags_converted.air_conditioning is defined and
commerce_overpass.tags_converted.air_conditioning == 'no' %}checked{% endif %}
>
<label class="form-check-label" for="clim_no">Non</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="commerce_tag_value__air_conditioning" id="clim_unknown"
value=""
{% if commerce_overpass.tags_converted.air_conditioning is not defined or commerce_overpass.tags_converted.air_conditioning == '' %}checked{% endif %}>
<label class="form-check-label" for="clim_unknown">Je ne sais pas</label>
</div>
</div>
</div>

View file

@ -12,50 +12,50 @@
<div class="col-12 p-4">
<input type="text" class="form-control d-none" name="commerce_tag_value__cuisine"
placeholder="french;italian"
value="{% if commerce.tags_converted.cuisine is defined %}{{ commerce.tags_converted.cuisine }}{% endif %}">
value="{% if commerce_overpass.tags_converted.cuisine is defined %}{{ commerce_overpass.tags_converted.cuisine }}{% endif %}">
<small class="form-text text-muted">{{'display.help.cuisine'|trans}}</small>
<div class="form-check">
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_chinoise" value="chinese" {% if commerce.tags_converted.cuisine is defined and 'chinese' in commerce.tags_converted.cuisine %}checked{% endif %}>
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_chinoise" value="chinese" {% if commerce_overpass.tags_converted.cuisine is defined and 'chinese' in commerce_overpass.tags_converted.cuisine %}checked{% endif %}>
<label class="form-check-label col-12" for="cuisine_chinoise">Chinoise</label>
</div>
<div class="form-check">
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_coreenne" value="korean" {% if commerce.tags_converted.cuisine is defined and 'korean' in commerce.tags_converted.cuisine %}checked{% endif %}>
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_coreenne" value="korean" {% if commerce_overpass.tags_converted.cuisine is defined and 'korean' in commerce_overpass.tags_converted.cuisine %}checked{% endif %}>
<label class="form-check-label col-12" for="cuisine_coreenne">Coréenne</label>
</div>
<div class="form-check">
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_francaise" value="french" {% if commerce.tags_converted.cuisine is defined and 'french' in commerce.tags_converted.cuisine %}checked{% endif %}>
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_francaise" value="french" {% if commerce_overpass.tags_converted.cuisine is defined and 'french' in commerce_overpass.tags_converted.cuisine %}checked{% endif %}>
<label class="form-check-label col-12" for="cuisine_francaise">Française</label>
</div>
<div class="form-check">
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_indienne" value="indian" {% if commerce.tags_converted.cuisine is defined and 'indian' in commerce.tags_converted.cuisine %}checked{% endif %}>
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_indienne" value="indian" {% if commerce_overpass.tags_converted.cuisine is defined and 'indian' in commerce_overpass.tags_converted.cuisine %}checked{% endif %}>
<label class="form-check-label col-12" for="cuisine_indienne">Indienne</label>
</div>
<div class="form-check">
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_italienne" value="italian" {% if commerce.tags_converted.cuisine is defined and 'italian' in commerce.tags_converted.cuisine %}checked{% endif %}>
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_italienne" value="italian" {% if commerce_overpass.tags_converted.cuisine is defined and 'italian' in commerce_overpass.tags_converted.cuisine %}checked{% endif %}>
<label class="form-check-label col-12" for="cuisine_italienne">Italienne</label>
</div>
<div class="form-check">
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_japonaise" value="japanese" {% if commerce.tags_converted.cuisine is defined and 'japanese' in commerce.tags_converted.cuisine %}checked{% endif %}>
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_japonaise" value="japanese" {% if commerce_overpass.tags_converted.cuisine is defined and 'japanese' in commerce_overpass.tags_converted.cuisine %}checked{% endif %}>
<label class="form-check-label col-12" for="cuisine_japonaise">Japonaise</label>
</div>
<div class="form-check">
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_libanaise" value="lebanese" {% if commerce.tags_converted.cuisine is defined and 'lebanese' in commerce.tags_converted.cuisine %}checked{% endif %}>
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_libanaise" value="lebanese" {% if commerce_overpass.tags_converted.cuisine is defined and 'lebanese' in commerce_overpass.tags_converted.cuisine %}checked{% endif %}>
<label class="form-check-label col-12" for="cuisine_libanaise">Libanaise</label>
</div>
<div class="form-check">
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_thailandaise" value="thai" {% if commerce.tags_converted.cuisine is defined and 'thai' in commerce.tags_converted.cuisine %}checked{% endif %}>
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_thailandaise" value="thai" {% if commerce_overpass.tags_converted.cuisine is defined and 'thai' in commerce_overpass.tags_converted.cuisine %}checked{% endif %}>
<label class="form-check-label col-12" for="cuisine_thailandaise">Thaïlandaise</label>
</div>
<div class="form-check">
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_turque" value="turkish" {% if commerce.tags_converted.cuisine is defined and 'turkish' in commerce.tags_converted.cuisine %}checked{% endif %}>
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_turque" value="turkish" {% if commerce_overpass.tags_converted.cuisine is defined and 'turkish' in commerce_overpass.tags_converted.cuisine %}checked{% endif %}>
<label class="form-check-label col-12" for="cuisine_turque">Turque</label>
</div>
<div class="form-check">
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_pizza" value="pizza" {% if commerce.tags_converted.cuisine is defined and 'pizza' in commerce.tags_converted.cuisine %}checked{% endif %}>
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_pizza" value="pizza" {% if commerce_overpass.tags_converted.cuisine is defined and 'pizza' in commerce_overpass.tags_converted.cuisine %}checked{% endif %}>
<label class="form-check-label col-12" for="cuisine_pizza">Pizza</label>
</div>
<div class="form-check">
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_kebab" value="kebab" {% if commerce.tags_converted.cuisine is defined and 'kebab' in commerce.tags_converted.cuisine %}checked{% endif %}>
<input class="form-check-input col-2" type="checkbox" name="cuisine_type" id="cuisine_kebab" value="kebab" {% if commerce_overpass.tags_converted.cuisine is defined and 'kebab' in commerce_overpass.tags_converted.cuisine %}checked{% endif %}>
<label class="form-check-label col-12" for="cuisine_kebab">Kebab</label>
</div>
<div class="mb-3">