diff --git a/netbox/netbox/views/generic/object_views.py b/netbox/netbox/views/generic/object_views.py index 42407963d..4e8c3ad86 100644 --- a/netbox/netbox/views/generic/object_views.py +++ b/netbox/netbox/views/generic/object_views.py @@ -238,7 +238,8 @@ class ObjectEditView(GetReturnURLMixin, BaseObjectView): model = self.queryset.model initial_data = normalize_querydict(request.GET) - form = self.form(instance=obj, initial=initial_data) + form_prefix = 'quickadd' if request.GET.get('_quickadd') else None + form = self.form(instance=obj, initial=initial_data, prefix=form_prefix) restrict_form_fields(form, request.user) context = { diff --git a/netbox/project-static/dist/netbox.js b/netbox/project-static/dist/netbox.js index fa1a0bcd1..f4396002b 100644 Binary files a/netbox/project-static/dist/netbox.js and b/netbox/project-static/dist/netbox.js differ diff --git a/netbox/project-static/dist/netbox.js.map b/netbox/project-static/dist/netbox.js.map index 85c0c644b..fb4435ea4 100644 Binary files a/netbox/project-static/dist/netbox.js.map and b/netbox/project-static/dist/netbox.js.map differ diff --git a/netbox/project-static/src/buttons/markdownPreview.ts b/netbox/project-static/src/buttons/markdownPreview.ts index 224b2beab..eb8657930 100644 --- a/netbox/project-static/src/buttons/markdownPreview.ts +++ b/netbox/project-static/src/buttons/markdownPreview.ts @@ -1,5 +1,3 @@ -import { isTruthy } from 'src/util'; - /** * interface for htmx configRequest event */ @@ -17,15 +15,6 @@ function initMarkdownPreview(markdownWidget: HTMLDivElement) { const textarea = markdownWidget.querySelector('textarea') as HTMLTextAreaElement; const preview = markdownWidget.querySelector('div.preview') as HTMLDivElement; - /** - * Make sure the textarea has style attribute height - * So that it can be copied over to preview div. - */ - if (!isTruthy(textarea.style.height)) { - const { height } = textarea.getBoundingClientRect(); - textarea.style.height = `${height}px`; - } - /** * Add the value of the textarea to the body of the htmx request * and copy the height of text are to the preview div