Skip to content

Commit ec7b338

Browse files
authored
fix: trix inlines (#963)
1 parent 43da532 commit ec7b338

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/unfold/contrib/forms/templates/unfold/forms/helpers/toolbar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% load i18n %}
22

33
<template id="trix-toolbar">
4-
<div class="bg-base-50 flex flex-row flex-wrap border group-[.errors]:border-t-red-600 gap-4 group-[.errors]:border-x-red-600 px-3 py-2 relative rounded shadow-sm w-full dark:bg-white/[.02] dark:border-base-700 dark:group-[.errors]:border-t-red-500 dark:group-[.errors]:border-x-red-500">
4+
<div class="bg-base-50 flex flex-row flex-wrap border group-[.errors]:border-t-red-600 gap-4 group-[.errors]:border-x-red-600 px-3 py-2 relative rounded rounded-b-none shadow-sm w-full dark:bg-white/[.02] dark:border-base-700 dark:group-[.errors]:border-t-red-500 dark:group-[.errors]:border-x-red-500">
55
<div data-trix-button-group="text-tools" class="bg-white border border-md flex flex-row rounded shadow-sm shrink-0 dark:bg-base-900 dark:border-base-700 dark:text-font-default-dark">
66
{% spaceless %}
77
<button type="button" data-trix-attribute="p" data-trix-key="p" title="{% trans "Paragraph" %}" tabindex="-1" class="border-r cursor-pointer flex items-center h-8 justify-center transition-colors w-8 hover:text-primary-600 dark:border-base-700">

src/unfold/static/admin/js/inlines.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
el.id = el.id.replace(id_regex, replacement);
3333
}
3434
if (el.name) {
35-
el.name = el.name.replace(id_regex, replacement);
35+
// !CHANGED from original
36+
// el.name = el.name.replace(id_regex, replacement);
37+
el.setAttribute("name", el.name.replace(id_regex, replacement));
3638
}
3739
};
3840
const totalForms = $("#id_" + options.prefix + "-TOTAL_FORMS").prop(

src/unfold/static/unfold/css/styles.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)