can add other question types within section

This commit is contained in:
Zuzanna 2025-10-02 15:44:14 +02:00
parent ff5a2055d2
commit 8fae26b0da

View File

@ -3849,7 +3849,7 @@ define([
if (!APP.isEditor) { return; }
var full = !uid;
var addControl = function (type) {
if (type === "section" && inSection) { return; }
if (type === "section" && (uid && !content.order.includes(uid) || uid && inSection) ) { return; }
var btn = h('button.btn.btn-secondary', {
title: full ? '' : Messages['form_type_'+type],
@ -3943,8 +3943,7 @@ define([
$container.find('.cp-form-block:not(.cp-form-submit-message)').each(function (i, el) {
var $el = $(el);
var uid = $el.attr('data-id');
var inSection = !content.order.includes(uid);
$el.before(getFormCreator(uid, inSection));
$el.before(getFormCreator(uid));
});
// Add to the end of a section
$container.find('.cp-form-section-sortable').each(function (i, el) {