Skip to content
Snippets Groups Projects
Unverified Commit 8f70ba23 authored by Sebastian Castro's avatar Sebastian Castro
Browse files

element-data: use readonly instead of disabled

parent 611d517d
No related branches found
No related tags found
No related merge requests found
...@@ -9,15 +9,15 @@ ...@@ -9,15 +9,15 @@
<th>{{ key }}</th> <th>{{ key }}</th>
<td> <td>
{% set type = "text" %} {% set type = "text" %}
{% set disabled = false %} {% set readonly = false %}
{% if not is_string(value) and not is_numeric(value) %} {% if not is_string(value) and not is_numeric(value) %}
{% set disabled = true %} {% set readonly = true %}
{% set value = value|json_encode %} {% set value = value|json_encode %}
{% endif %} {% endif %}
{% if key matches '/^osm\:/' %} {% if key matches '/^osm\:/' %}
{% set disabled = true %} {% set readonly = true %}
{% endif %} {% endif %}
<input type="{{ type }}" class="form-control" {{ disabled ? 'disabled="disabled"' : '' }} <input type="{{ type }}" class="form-control" {{ readonly ? 'readonly="readonly"' : '' }}
name="{{ 'data[' ~ key ~ ']'}}" value="{{ value }}" /> name="{{ 'data[' ~ key ~ ']'}}" value="{{ value }}" />
</td> </td>
</tr> </tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment