From 09b0ea4c44fd7f5039ef30289711361d1f2b33f0 Mon Sep 17 00:00:00 2001 From: PanierAvide <panieravide@riseup.net> Date: Thu, 21 Jan 2021 09:44:44 +0100 Subject: [PATCH] Make OSM fields not editable --- .../admin/core_custom/custom-fields/element-data.html.twig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/templates/admin/core_custom/custom-fields/element-data.html.twig b/templates/admin/core_custom/custom-fields/element-data.html.twig index 4e16dbf18..cbd76955c 100644 --- a/templates/admin/core_custom/custom-fields/element-data.html.twig +++ b/templates/admin/core_custom/custom-fields/element-data.html.twig @@ -2,7 +2,7 @@ <h4 style="margin-top: 25px;">Champs Personnalisés</h4> <div class="table-responsive no-padding"> - <table class="table"> + <table class="table"> <tbody> {% for key, value in element.data %} <tr class="sonata-ba-view-container"> @@ -14,6 +14,9 @@ {% set disabled = true %} {% set value = value|json_encode %} {% endif %} + {% if key matches '/^osm\:/' %} + {% set disabled = true %} + {% endif %} <input type="{{ type }}" class="form-control" {{ disabled ? 'disabled="disabled"' : '' }} name="{{ 'data[' ~ key ~ ']'}}" value="{{ value }}" /> </td> @@ -22,4 +25,4 @@ </tbody> </table> </div> -<h4>Champs Spéciaux</h4> \ No newline at end of file +<h4>Champs Spéciaux</h4> -- GitLab