#2945 Fast create edit category error

This commit is contained in:
Diatrex 2021-02-03 18:04:02 +03:00
parent d62cdb70c8
commit 8a7c5e4515

View File

@ -4,9 +4,20 @@
{{ content|raw }}
{% if form.mode == 'edit' %}
{% set entry = form.entry.setAttribute('cf_json', null) %}
{% set entry = form.entry %}
<script>
const ad = JSON.parse(`{{ entry|json_encode|raw }}`)
const ad = {
cat1: `{{ entry.cat1 }}`,
cat2: `{{ entry.cat2 }}`,
cat3: `{{ entry.cat3 }}`,
cat4: `{{ entry.cat4 }}`,
cat5: `{{ entry.cat5 }}`,
cat6: `{{ entry.cat6 }}`,
cat7: `{{ entry.cat7 }}`,
cat8: `{{ entry.cat8 }}`,
cat9: `{{ entry.cat9 }}`,
cat10: `{{ entry.cat10 }}`,
}
</script>
{% endif %}
{% endblock %}