Disable phase date fields when a phase is disabled

The JavaScript involved wasn't working since we removed the disable-date
attribute in commit 73ff6881.

We're also improving the JavaScript in two ways:

First, we trigger the `change` event immediately, so when the page loads
date fields are disabled when phases are disabled.

And second, we don't remove the selected dates when disabling a phase,
so disabling it and enabling it again will keep the selected values.
This commit is contained in:
Javi Martín
2020-08-14 18:34:16 +02:00
parent 6172dd0a56
commit 1e70a3db02
3 changed files with 49 additions and 7 deletions

View File

@@ -1074,6 +1074,10 @@ form {
&.error {
margin-bottom: rem-calc(1);
}
&:disabled {
background-color: $input-background-disabled;
}
}
[type="checkbox"] + label,