mirror of
https://forge.chapril.org/tykayn/osm-commerces
synced 2025-06-20 01:44:42 +02:00
affichage de modif qui cache les champs déjà remplis
This commit is contained in:
parent
2628b1c7f7
commit
f11ab48bb9
8 changed files with 166 additions and 115 deletions
|
@ -12,9 +12,12 @@ use Symfony\Component\Routing\Annotation\Route;
|
|||
use GuzzleHttp\Client;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
|
||||
class PublicController extends AbstractController
|
||||
{
|
||||
|
||||
private $hide_filled_inputs = true;
|
||||
|
||||
public function __construct(
|
||||
private EntityManagerInterface $entityManager,
|
||||
private Motocultrice $motocultrice
|
||||
|
@ -65,6 +68,7 @@ class PublicController extends AbstractController
|
|||
'commerce_overpass' => $commerce_overpass,
|
||||
'name' => $name,
|
||||
'commerce' => $place,
|
||||
'hide_filled_inputs' => $this->hide_filled_inputs,
|
||||
'excluded_tags_to_render' => $this->motocultrice->excluded_tags_to_render,
|
||||
'osm_kind' => $place->getOsmKind(),
|
||||
"mapbox_token" => $_ENV['MAPBOX_TOKEN'],
|
||||
|
@ -108,7 +112,7 @@ class PublicController extends AbstractController
|
|||
$request_post = $this->motocultrice->map_post_values($request_post);
|
||||
|
||||
foreach ($request_post as $key => $value) {
|
||||
// var_dump($key, $value);
|
||||
|
||||
if (strpos($key, 'commerce_tag_value__') === 0) {
|
||||
$tagKey = str_replace('commerce_tag_value__', '', $key);
|
||||
if (!empty($value)) {
|
||||
|
@ -225,9 +229,13 @@ class PublicController extends AbstractController
|
|||
|
||||
// après envoi on récupère les données
|
||||
$commerce = $this->motocultrice->get_osm_object_data($osm_kind, $osm_object_id);
|
||||
|
||||
|
||||
|
||||
return $this->render('public/view.html.twig', [
|
||||
'controller_name' => 'PublicController',
|
||||
'commerce' => $commerce,
|
||||
|
||||
'status' => $status,
|
||||
'exception' => $exception,
|
||||
'exception_message' => $exception_message,
|
||||
|
|
|
@ -26,9 +26,39 @@ class Motocultrice
|
|||
'addr:street',
|
||||
'contact:website',
|
||||
'contact:mastodon',
|
||||
'image',
|
||||
'image',
|
||||
'note'
|
||||
];
|
||||
|
||||
// quand un commerce a fermé, on peut supprimer ces tags
|
||||
public $obsolete_tags = ["phone", "website", "email", "description", "brand", "opening_hours",
|
||||
"check_date:opening_hours", "internet_access",
|
||||
"indoor_seating", "takeaway", "female", "male", "unisex",
|
||||
"ref:FR:NAF", "ref:FR:FINESS", "ref:FR:SIRET", "ref:FR:SIREN", "ref:vatin",
|
||||
"healthcare", "dispensing", "lawyer", "vending", "vending_machine",
|
||||
"self_service", "second_hand", "branch", "delivery", "start_date",
|
||||
"beauty", "facebook", "tobacco", "bulk_purchase",
|
||||
"drive_through", "pastry", "stroller", "fax", "trade", "network",
|
||||
"mobile", "sport", "produce", "lottery", "supermarket", "information",
|
||||
"tourism", "government", "brewery"
|
||||
];
|
||||
public $tags_to_remove = ["diet:", "contact:", "name:", "payment:", "delivery:", "type:FR:", "ref:FR:SDIS:",
|
||||
"brand:", "fuel:", "service:", "description:", "operator:", "tickets:", "healthcare:"
|
||||
];
|
||||
public $tags_to_convert = ["shop" => "was:shop",
|
||||
"information" => "was:information",
|
||||
"office" => "was:office",
|
||||
"amenity" => "was:amenity",
|
||||
"craft" => "was:craft",
|
||||
"operator" => "was:operator",
|
||||
"clothes" => "was:clothes",
|
||||
"cuisine" => "was:cuisine",
|
||||
"official_name" => "was:official_name",
|
||||
"short_name" => "was:short_name",
|
||||
"alt_name" => "was:alt_name"
|
||||
|
||||
];
|
||||
|
||||
private $more_tags = ['image', 'ref:FR:SIRET'];
|
||||
public function __construct(
|
||||
private HttpClientInterface $client,
|
||||
|
@ -41,6 +71,11 @@ class Motocultrice
|
|||
$has_ask_angela = false;
|
||||
$remove_ask_angela = false;
|
||||
$has_opening_hours = false;
|
||||
// $has_phone = false;
|
||||
// $has_contact_phone = false;
|
||||
|
||||
// $has_email = false;
|
||||
// $has_contact_email = false;
|
||||
|
||||
|
||||
$modified_request_post = [];
|
||||
|
@ -171,12 +206,14 @@ QUERY;
|
|||
foreach ($osm_object_data['node']['tag'] as $attribute) {
|
||||
$osm_object_data['node']['tags_converted'][$attribute['@attributes']['k']] = $attribute['@attributes']['v'];
|
||||
}
|
||||
$osm_object_data['node']['tags_converted'] = $this->migrate_tags($osm_object_data['node']['tags_converted']);
|
||||
return $osm_object_data['node'];
|
||||
}
|
||||
if(isset($osm_object_data['way'])){
|
||||
foreach ($osm_object_data['way']['tag'] as $attribute) {
|
||||
$osm_object_data['way']['tags_converted'][$attribute['@attributes']['k']] = $attribute['@attributes']['v'];
|
||||
}
|
||||
$osm_object_data['way']['tags_converted'] = $this->migrate_tags($osm_object_data['way']['tags_converted']);
|
||||
return $osm_object_data['way'];
|
||||
}
|
||||
|
||||
|
@ -184,6 +221,29 @@ QUERY;
|
|||
}
|
||||
|
||||
|
||||
public function migrate_tags($osm_object_data) {
|
||||
|
||||
// migrer email vers contact:email
|
||||
if(isset($osm_object_data['email']) && !isset($osm_object_data['contact:email'])){
|
||||
$osm_object_data['contact:email'] = $osm_object_data['email'];
|
||||
unset($osm_object_data['email']);
|
||||
}
|
||||
// migrer phone vers contact:phone
|
||||
if(isset($osm_object_data['phone']) && !isset($osm_object_data['contact:phone'])){
|
||||
$osm_object_data['contact:phone'] = $osm_object_data['phone'];
|
||||
unset($osm_object_data['phone']);
|
||||
}
|
||||
// migrer website vers contact:website
|
||||
if(isset($osm_object_data['website']) && !isset($osm_object_data['contact:website'])){
|
||||
$osm_object_data['contact:website'] = $osm_object_data['website'];
|
||||
unset($osm_object_data['website']);
|
||||
}
|
||||
|
||||
return $osm_object_data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function uuid_create() {
|
||||
return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
|
||||
// 32 bits for "time_low"
|
||||
|
@ -212,7 +272,7 @@ QUERY;
|
|||
$essentialTags = [
|
||||
'name',
|
||||
'opening_hours',
|
||||
'phone',
|
||||
// 'phone',
|
||||
'contact:email',
|
||||
'contact:phone',
|
||||
'website',
|
||||
|
|
|
@ -35,7 +35,8 @@
|
|||
min-height: 100vh;
|
||||
}
|
||||
.main-footer{
|
||||
padding-bottom: 3rem;
|
||||
padding-bottom: 15rem;
|
||||
margin-top: 5rem;
|
||||
}
|
||||
{# table tr:nth-child(odd){
|
||||
background-color:rgb(235, 235, 235);
|
||||
|
@ -53,10 +54,14 @@
|
|||
<body>
|
||||
<header class="main-header">
|
||||
<div id="completion_progress">
|
||||
<div class="progress" role="progressbar" aria-label="Basic example" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
|
||||
<div class="progress-bar" style="width: 0%"></div>
|
||||
<div class="container">
|
||||
<div id="completion_display"></div>
|
||||
|
||||
<div class="progress" role="progressbar" aria-label="Basic example" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
|
||||
<div class="progress-bar" style="width: 0%"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
|
@ -84,7 +89,7 @@
|
|||
<div class="body-landing">
|
||||
{% block body %}{% endblock %}
|
||||
</div>
|
||||
<footer class="main-footer">
|
||||
<footer class="main-footer dark">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
@ -96,9 +101,11 @@
|
|||
|
||||
<p>OpenStreetMap Mon Commerce</p>
|
||||
<p>Licence AGPLv3+,
|
||||
fait par Tykayn de
|
||||
fait par <a href="https://mastodon.cipherbliss.com/@tykayn">Tykayn</a> de
|
||||
<a href="https://www.cipherbliss.com">CipherBliss EI</a>, membre de la fédération des professionels d'OpenStreetMap, Sources des données : <a href="https://www.openstreetmap.org/">OpenStreetMap</a>.
|
||||
<br> <a href="https://www.openstreetmap.org/copyright">OpenStreetMap France</a></p>
|
||||
<br> <a href="https://www.openstreetmap.org/copyright">OpenStreetMap France</a>.
|
||||
<br> <a href="https://www.openstreetmap.org/copyright">Sources du logiciel.</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -6,35 +6,16 @@
|
|||
{{ parent() }}
|
||||
<link href='https://api.mapbox.com/mapbox-gl-js/v2.15.0/mapbox-gl.css' rel='stylesheet' />
|
||||
<style>
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
input[type="checkbox"] {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
.is-invalid {
|
||||
border: 1px solid red;
|
||||
}
|
||||
.is-invalid #validation_messages {
|
||||
color: red;
|
||||
}
|
||||
img{
|
||||
max-width: 100%;
|
||||
max-height: 400px;
|
||||
}
|
||||
.hidden { display: none; }
|
||||
input[type="checkbox"] { width: 20px; height: 20px; }
|
||||
.is-invalid { border: 1px solid red; }
|
||||
.is-invalid #validation_messages { color: red; }
|
||||
img { max-width: 100%; max-height: 400px; }
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container mt-4">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card shadow-sm">
|
||||
|
@ -43,8 +24,6 @@
|
|||
<div id="map" style="height: 400px; width: 100%;" class="rounded"></div>
|
||||
|
||||
{% if commerce_overpass is not empty %}
|
||||
|
||||
|
||||
<form action="{{ path('app_public_submit', {'osm_object_id': commerce_overpass['@attributes'].id, 'version': commerce_overpass['@attributes'].version, 'changesetID': commerce_overpass['@attributes'].changeset }) }}" method="post" class="needs-validation">
|
||||
<input type="hidden" name="osm_kind" value="{{ osm_kind }}">
|
||||
<div class="mb-3">
|
||||
|
@ -60,7 +39,6 @@
|
|||
</strong>
|
||||
</label>
|
||||
<br/>
|
||||
|
||||
<a class="btn btn-info" href="{{ path('app_public_index') }}">{{ 'display.contact_humans'|trans }}</a>
|
||||
</div>
|
||||
|
||||
|
@ -69,51 +47,55 @@
|
|||
{% endif %}
|
||||
|
||||
<h2>{{ 'display.attributes'|trans }}</h2>
|
||||
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-5">
|
||||
<div class="col-md-5">
|
||||
<label for="commerce_tag_value__name">{{'display.keys.name'|trans}}</label>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<input type="text" class="form-control" name="commerce_tag_value__name" value="{% if commerce_overpass.tags_converted.name is defined %}{{ commerce_overpass.tags_converted.name }}{% elseif commerce_overpass['@attributes'].name is defined %}{{ commerce_overpass['@attributes'].name }}{% endif %}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-5">
|
||||
<input type="text" class="form-control" name="commerce_tag_value__name" value="{% if commerce_overpass.tags_converted.name is defined %}{{ commerce_overpass.tags_converted.name }}{% elseif commerce_overpass['@attributes'].name is defined %}{{ commerce_overpass['@attributes'].name }}{% endif %}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if hide_filled_inputs and
|
||||
(commerce_overpass.tags_converted['addr:street']) is defined and commerce_overpass.tags_converted['addr:street'] is not empty
|
||||
%}
|
||||
{% include 'public/edit/address.html.twig' %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if hide_filled_inputs and (commerce_overpass.tags_converted.opening_hours) is defined and commerce_overpass.tags_converted.opening_hours is not empty %}
|
||||
{% include 'public/edit/opening_hours.html.twig' %}
|
||||
{% endif %}
|
||||
{% if hide_filled_inputs and (commerce_overpass.tags_converted.wheelchair) is defined and commerce_overpass.tags_converted.wheelchair is not empty %}
|
||||
{% include 'public/edit/wheelchair.html.twig' %}
|
||||
{% endif %}
|
||||
{% if hide_filled_inputs and (commerce_overpass.tags_converted.ask_angela) is defined and commerce_overpass.tags_converted.ask_angela is not empty %}
|
||||
{% include 'public/edit/ask_angela.html.twig' %}
|
||||
{% endif %}
|
||||
|
||||
{% include 'public/edit/address.html.twig' %}
|
||||
{% include 'public/edit/opening_hours.html.twig' %}
|
||||
{% include 'public/edit/wheelchair.html.twig' %}
|
||||
{% include 'public/edit/ask_angela.html.twig' %}
|
||||
{% include 'public/edit/tags.html.twig' %}
|
||||
|
||||
<div id="validation_messages"></div>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="bi bi-send"></i>
|
||||
|
||||
{{ 'display.submit'|trans }}</button>
|
||||
<i class="bi bi-send"></i>
|
||||
{{ 'display.submit'|trans }}
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<span class="p-4">
|
||||
<span class="last-modification">{{ 'display.last_modification'|trans }}: {{ commerce_overpass['@attributes'].timestamp }}</span>,
|
||||
<strong>
|
||||
{{ 'display.days_ago'|trans({'%days%': date(commerce_overpass['@attributes'].timestamp).diff(date()).days}) }} </strong>
|
||||
<strong>{{ 'display.days_ago'|trans({'%days%': date(commerce_overpass['@attributes'].timestamp).diff(date()).days}) }}</strong>
|
||||
{{ 'display.by'|trans }}
|
||||
<a href="https://www.openstreetmap.org/user/{{ commerce_overpass['@attributes'].user }}" target="_blank">{{ commerce_overpass['@attributes'].user }}</a>
|
||||
|
||||
<div class="lien-OpenStreetMap">
|
||||
<a href="https://www.openstreetmap.org/node/{{ commerce_overpass['@attributes'].id }}" target="_blank">{{ 'display.view_on_osm'|trans }}</a>
|
||||
</div>
|
||||
|
||||
</span>
|
||||
<div class="disclaimer p-3">
|
||||
<p>
|
||||
|
@ -123,31 +105,24 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
<script src='https://api.mapbox.com/mapbox-gl-js/v2.15.0/mapbox-gl.js'></script>
|
||||
<script>
|
||||
|
||||
|
||||
function check_validity(e){
|
||||
let errors = [];
|
||||
// Réinitialiser les classes d'erreur
|
||||
<script>
|
||||
function check_validity(e) {
|
||||
let errors = [];
|
||||
document.querySelectorAll('.is-invalid').forEach(input => {
|
||||
input.classList.remove('is-invalid');
|
||||
});
|
||||
|
||||
// Vérification du nom
|
||||
const nameInput = document.querySelector('input[name="commerce_tag_value__name"]');
|
||||
if (!nameInput.value.trim()) {
|
||||
errors.push("Le nom de l'établissement est obligatoire");
|
||||
nameInput.classList.add('is-invalid');
|
||||
}
|
||||
|
||||
// Vérification de l'email
|
||||
const emailInput = document.querySelector('input[name="commerce_tag_value__contact:email"]');
|
||||
if (emailInput && emailInput.value) {
|
||||
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
||||
|
@ -157,7 +132,6 @@ function check_validity(e){
|
|||
}
|
||||
}
|
||||
|
||||
// Vérification du téléphone
|
||||
const phoneInput = document.querySelector('input[name="commerce_tag_value__contact:phone"]');
|
||||
if (phoneInput && phoneInput.value) {
|
||||
const phoneRegex = /^(\+33|0)[1-9](\d{2}){4}$/;
|
||||
|
@ -167,67 +141,55 @@ function check_validity(e){
|
|||
}
|
||||
}
|
||||
|
||||
// Affichage des erreurs si présentes
|
||||
if (errors.length > 0) {
|
||||
e.preventDefault();
|
||||
document.querySelector('#validation_messages').innerHTML = errors.join('<br>');
|
||||
document.querySelector('#validation_messages').classList.add('is-invalid');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{% if commerce is not empty and mapbox_token is not empty and maptiler_token is not empty and commerce_overpass['@attributes'].lon is defined and commerce_overpass['@attributes'].lat is defined %}
|
||||
mapboxgl.accessToken = '{{ mapbox_token }}';
|
||||
map = new mapboxgl.Map({
|
||||
container: 'map',
|
||||
style: 'https://api.maptiler.com/maps/basic-v2/style.json?key={{ maptiler_token }}',
|
||||
center: [
|
||||
{{ commerce_overpass['@attributes'].lon }},
|
||||
{{ commerce_overpass['@attributes'].lat }}
|
||||
],
|
||||
|
||||
center: [{{ commerce_overpass['@attributes'].lon }}, {{ commerce_overpass['@attributes'].lat }}],
|
||||
zoom: 14
|
||||
});
|
||||
|
||||
// Ajout du marqueur
|
||||
new mapboxgl.Marker()
|
||||
.setLngLat([
|
||||
{{ commerce_overpass['@attributes'].lon }},
|
||||
{{ commerce_overpass['@attributes'].lat }}
|
||||
])
|
||||
.setPopup(new mapboxgl.Popup({
|
||||
offset: 25
|
||||
}).setHTML('<h1>{{ commerce_overpass.tags_converted.name }}</h1>'))
|
||||
.setLngLat([{{ commerce_overpass['@attributes'].lon }}, {{ commerce_overpass['@attributes'].lat }}])
|
||||
.setPopup(new mapboxgl.Popup({ offset: 25 }).setHTML('<h1>{{ commerce_overpass.tags_converted.name }}</h1>'))
|
||||
.addTo(map);
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
// Fonction pour calculer et mettre à jour la barre de progression
|
||||
function updateCompletionProgress() {
|
||||
const inputs = document.querySelectorAll('input[type="text"]');
|
||||
let filledInputs = 0;
|
||||
let totalInputs = inputs.length;
|
||||
function updateCompletionProgress() {
|
||||
const inputs = document.querySelectorAll('input[type="text"]');
|
||||
let filledInputs = 0;
|
||||
let totalInputs = inputs.length;
|
||||
|
||||
inputs.forEach(input => {
|
||||
if (input.value.trim() !== '') {
|
||||
filledInputs++;
|
||||
}
|
||||
inputs.forEach(input => {
|
||||
if (input.value.trim() !== '') {
|
||||
filledInputs++;
|
||||
}
|
||||
});
|
||||
|
||||
const completionPercentage = (filledInputs / totalInputs) * 100;
|
||||
const progressBar = document.querySelector('#completion_progress .progress-bar');
|
||||
progressBar.style.width = completionPercentage + '%';
|
||||
progressBar.setAttribute('aria-valuenow', completionPercentage);
|
||||
|
||||
document.querySelector('#completion_display').innerHTML = `Votre commerce est complété à ${Math.round(completionPercentage)}%`;
|
||||
}
|
||||
|
||||
document.querySelectorAll('input[type="text"]').forEach(input => {
|
||||
input.addEventListener('blur', updateCompletionProgress);
|
||||
});
|
||||
|
||||
const completionPercentage = (filledInputs / totalInputs) * 100;
|
||||
const progressBar = document.querySelector('#completion_progress .progress-bar');
|
||||
document.querySelector('form').addEventListener('submit', check_validity);
|
||||
document.addEventListener('DOMContentLoaded', updateCompletionProgress);
|
||||
|
||||
|
||||
progressBar.style.width = completionPercentage + '%';
|
||||
progressBar.setAttribute('aria-valuenow', completionPercentage);
|
||||
}
|
||||
|
||||
// Ajouter les écouteurs d'événements sur tous les champs input
|
||||
document.querySelectorAll('input[type="text"]').forEach(input => {
|
||||
input.addEventListener('blur', updateCompletionProgress);
|
||||
});
|
||||
// Validation du formulaire avant envoi
|
||||
document.querySelector('form').addEventListener('submit', check_validity);
|
||||
|
||||
// Calculer la progression initiale au chargement
|
||||
document.addEventListener('DOMContentLoaded', updateCompletionProgress);
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -5,20 +5,24 @@
|
|||
<p class="description">{{ 'display.opening_hours_description'|trans }}</p>
|
||||
|
||||
{% if commerce_overpass.tags_converted.opening_hours is defined and commerce_overpass.tags_converted.opening_hours != '' %}
|
||||
{{ dump(commerce_overpass.tags_converted.opening_hours) }}
|
||||
{# {{ dump(commerce_overpass.tags_converted.opening_hours) }} #}
|
||||
<input type="text" placeholder="Remplissez" class="form-control" name="custom__opening_hours" value="{{ commerce_overpass.tags_converted.opening_hours }}">
|
||||
{% else %}
|
||||
<input type="text" placeholder="Lundi de 10h à 12h et de 14h à 18h" class="form-control" name="custom__opening_hours" value="">
|
||||
<br> ajoutez les horaires au format OSM
|
||||
{% endif %}
|
||||
|
||||
<span class="examples">Exemples :</span>
|
||||
<div class="examples d-none">
|
||||
|
||||
Exemples :
|
||||
|
||||
<ul>
|
||||
<li>Écrivez "24/7" pour indiquer que le commerce est ouvert 24 heures sur 24</li>
|
||||
<li>Écrivez "Mo-Fr 9:00 - 18:00" pour indiquer que le commerce est ouvert du lundi au vendredi de 9h à 18h</li>
|
||||
<li>Pour des horaires plus complexes, écrivez "Mo-Fr 9:00 - 18:00; Sa 9:00 - 12:00" pour indiquer que le commerce est ouvert du lundi au vendredi de 9h à 18h et le samedi de 9h à 12h</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
{# <input type="checkbox" name="commerce_tag_value__opening_hours_1" value="yes">
|
||||
Lundi de
|
||||
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
|
||||
{% for k, v in commerce_overpass.tags_converted %}
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="row mb-3 {% if hide_filled_inputs and v is not empty %}d-none{% endif %}">
|
||||
<div class="col-md-5">
|
||||
{% if k not in excluded_tags_to_render %}
|
||||
{% if k not in excluded_tags_to_render %}
|
||||
{% if k == 'phone' or k == 'contact:phone' %}
|
||||
<i class="bi bi-telephone"></i>
|
||||
{% elseif k == 'addr:housenumber' or k == 'addr:street' or k == 'addr:city' or k == 'addr:postcode' or k == 'addr:country' %}
|
||||
<i class="bi bi-geo-alt"></i>
|
||||
{% elseif k == 'mastodon' %}
|
||||
{% elseif k == 'contact:mastodon' %}
|
||||
<i class="bi bi-mastodon"></i>
|
||||
{% elseif k == 'email' or k == 'contact:email' %}
|
||||
<i class="bi bi-envelope"></i>
|
||||
|
|
|
@ -13,18 +13,27 @@
|
|||
<label class="form-check-label" for="wheelchair_yes">
|
||||
{{'display.values.wheelchair.yes'|trans}}
|
||||
</label>
|
||||
<p>
|
||||
toutes les pièces sont accessibles sans marche.
|
||||
</p>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="commerce_tag_value__wheelchair" id="wheelchair_limited" value="limited" {% if commerce_overpass.tags_converted.wheelchair is defined and commerce_overpass.tags_converted.wheelchair == 'limited' %}checked{% endif %}>
|
||||
<label class="form-check-label" for="wheelchair_limited">
|
||||
{{'display.values.wheelchair.limited'|trans}}
|
||||
</label>
|
||||
<p>
|
||||
les pièces principales sont accessibles sans marche.
|
||||
</p>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="commerce_tag_value__wheelchair" id="wheelchair_no" value="no" {% if commerce_overpass.tags_converted.wheelchair is defined and commerce_overpass.tags_converted.wheelchair == 'no' %}checked{% endif %}>
|
||||
<label class="form-check-label" for="wheelchair_no">
|
||||
{{'display.values.wheelchair.no'|trans}}
|
||||
</label>
|
||||
<p>
|
||||
autres cas. une marche fait plus de 7cm, entrée trop étroite ou bien plusieurs marches.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -64,6 +64,7 @@ display:
|
|||
source: "Source"
|
||||
ref:FR:SIRET: "SIRET"
|
||||
image: "URL vers une Image"
|
||||
note: "Champ libre, pour des informations complémentaires. Ne pas mettre de publicité"
|
||||
disclaimer:
|
||||
title: "Attention"
|
||||
text: "Ce site est un travail en cours, ceci est une démonstration sur un objet fictif qui utilise les données de l'API OpenStreetMap."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue