When the custom coverage accordion is displayed, check whether the agreement line has a linked e-resource. If no e-resource is linked the "Add custom coverage" button should be inactive, with a tooltip "Custom coverage can be added when an e-resource is linked". See mockup.
If the user has entered Custom coverage and then removes the linked e-resource a validation warning banner should be displayed and each field containing data should display a warning message as shown in the mockup.
Text for banner: All custom coverage data will be cleared. To save custom coverage data please link an e-resource
Text for field messages: [field label] will be cleared as no e-resource is linked
The standard warning message styles should be applied.
If the e-resource is removed and coverage data exists which is already invalid, i.e. the dates are overlapping and error messages are already displayed, the error messages should be removed and replaced with the warning messages.