Item form: Fancy radio buttons for has_Variations and admission

This commit is contained in:
Raphael Michel
2020-11-23 15:25:48 +01:00
parent 14a66ff80c
commit 2ebd040a7c
7 changed files with 151 additions and 15 deletions

View File

@@ -31,9 +31,9 @@ $(document).ready(function () {
);
function toggleblock() {
$("#new-quota-group").closest('fieldset').toggle(!$("#id_has_variations").prop('checked'));
$("#new-quota-group").closest('fieldset').toggle(!$("[name=has_variations][value=on]").prop('checked'));
}
$("#id_has_variations").change(toggleblock);
$("[name=has_variations]").change(toggleblock);
toggleblock();
});