Allow selecting the same add-on multiple times (#1717)

This commit is contained in:
Raphael Michel
2020-07-20 10:21:12 +02:00
committed by GitHub
parent ed3542e219
commit 3c5948d2e0
19 changed files with 743 additions and 335 deletions

View File

@@ -114,6 +114,15 @@ var form_handlers = function (el) {
);
});
el.find("input[data-exclusive-prefix]").each(function () {
var $others = $("input[name^=" + $(this).attr("data-exclusive-prefix") + "]:not([name=" + $(this).attr("name") + "])");
$(this).on('click change', function () {
if ($(this).prop('checked')) {
$others.prop('checked', false);
}
});
});
el.find("input[name*=question], select[name*=question]").change(questions_toggle_dependent);
questions_toggle_dependent();
};

View File

@@ -87,3 +87,12 @@
display: none;
}
}
.addons {
fieldset {
margin-top: 20px;
&:first-child {
margin-top: 0;
}
}
}

View File

@@ -1,5 +1,11 @@
.product-row {
border-top: 1px solid $table-border-color;
.addons &:first-child {
border-top: 2px solid $table-border-color;
}
.addons &:last-child {
border-bottom: 2px solid $table-border-color;
}
&:last-child {
}