Fix -- copy answers even when matching customer profiles exist (#2209)

This commit is contained in:
Richard Schreiber
2021-09-16 10:07:43 +02:00
committed by GitHub
parent 2041d1213a
commit 2a3660f2d1
3 changed files with 5 additions and 3 deletions

View File

@@ -481,10 +481,12 @@ $(function () {
function copy_answers(elements, answers) {
elements.not("[disabled], [readonly]").each(function (index) {
if (!this.name) return;
var input = $(this),
tagName = input.prop('tagName').toLowerCase(),
attributeType = input.attr('type'),
suffix = input.attr('name').split('-')[1];
if (input.closest(".js-do-not-copy-answers").length) return;
switch (tagName) {
case "textarea":

View File

@@ -341,7 +341,7 @@ function questions_init_profiles(el) {
var $checkboxContainer = $checkbox.closest(".form-group").addClass("profile-save");
var $help = $selectContainer.find(".help-block");
var $container = $("<div class='profile-save-container'></div>");
var $container = $("<div class='profile-save-container js-do-not-copy-answers'></div>");
$selectContainer.after($container);
$container.append($checkboxContainer);
$container.append($selectContainer);