Files
cie-auth/federation_authority/templates/admin/change_form.html
T

20 lines
501 B
HTML

{% extends "admin/change_form.html" %}
{% block admin_change_form_document_ready %}
{{ block.super }}
<script>
Array.from(document.querySelectorAll('div.readonly')).forEach(div => {
let data;
try {
data = JSON.parse(div.innerText);
} catch {
// Not valid JSON
return;
}
div.style.whiteSpace = 'pre-wrap';
div.style.fontFamily = 'courier';
div.style.fontSize = '0.9em';
div.innerText = JSON.stringify(data, null, 2);
});
</script>
{% endblock %}