Should not be able to leave Display | Expand heading levels blank in TOC settings
Expected behaviour
User must fill in display | expand heading levels or maintain the "clone" defaults
Current behaviour
User can leave these fields blank, which are also passed blank to the PMCBookDomainTool
Steps to reproduce
In all contexts where these are provided, leave them blank.
Priority
Not until processing, and particularly if it breaks dispaly on Bookshelf site(s) (doesn't seem to in the preview above, but uncertain what assumptions are being made, so safer to permit it)
QA Steps
There are some cases where this setting is present:
A. Books
- Create a new book and in the second step of book creation try to leave 'display heading level' empty. It should show a validation error message.
- Save the book, by adding a value to the 'display heading level'.
- Go to book settings modal and try removing the values from
Display | Expand heading levels
. This should not allow you to save the settings changes.
B. Org templates
- Go to organization 'Book templates'
- Choose chapter-processed
- Try removing the values from
Display | Expand heading levels
. This should not allow you to save the template - Try the same by editing whole book templates
C. Collection templates
- Go to collection setting modal
- move to tab for collection templates
- Try removing values from
Display | Expand heading levels
, same as point B for both cases chapter-processed and whole book.
D. Existing books which have this setting empty
- If you try to edit an old book which already has this setting empty from previous changes, now you can't save the modal without adding a value for the headings as well.