Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GN-4524: date variable - fix config option to disable custom format #316

Conversation

x-m-el
Copy link
Contributor

@x-m-el x-m-el commented Oct 5, 2023

Overview

The config and readme already included the option allowCustomFormat, but this did not do anything. This PR fixes so that if allowCustomFormat is set to false, a custom format can't be used.

connected issues and PRs:

https://binnenland.atlassian.net/browse/GN-4524

How to test/reproduce

Change the config (depending on your test).
If allowCustomFormat is set to false, the radio button custom format should be disabled.
If the config option is missing (or set to true), the radio button should work.
In all older documents the date variable should always allow custom format (e.g. export and import some html of an older editor version, like the dev version)

Challenges/uncertainties

  • The default for this is set to true by default everywhere. This follows how it was before: regardless of the config option, custom formats were allowed. This makes this a non-breaking change.

  • the customAllowed boolean is added to the dataset instead of as rdfa, because this info for specifically for the editor UI and not meant as data to be published.

@abeforgit abeforgit merged commit e109035 into master Oct 6, 2023
3 checks passed
@abeforgit abeforgit deleted the GN-4524-editor-plugins-rd-fa-date-always-allows-custom-format-even-if-allow-custom-format-is-false branch October 6, 2023 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants