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();
});

View File

@@ -439,9 +439,9 @@ table td > .checkbox input[type="checkbox"] {
}
}
.form-horizontal .big-radio {
border: 2px solid #ccc;
border: 1px solid #ccc;
border-bottom: 0;
padding: 0;
border-radius: $border-radius-base;
label {
padding: 15px 15px 15px 30px;
}
@@ -449,9 +449,15 @@ table td > .checkbox input[type="checkbox"] {
.help-block {
margin-bottom: 0;
}
}
.form-horizontal .big-radio:not(:last-child) {
margin-bottom: 15px;
&:first-child {
border-top-left-radius: $border-radius-base;
border-top-right-radius: $border-radius-base;
}
&:last-child {
border-bottom-left-radius: $border-radius-base;
border-bottom-right-radius: $border-radius-base;
border-bottom: 1px solid #ccc;
}
}
.accordion-radio {
display: block;