silverstripe-australia/advancedworkflow — pull request #68 by phptek (2012-11-23 01:26:39+00:00)
Title: ENHANCEMENT: Added validation on Embargo extension to show message when ...

...an embargo date already exists on a content-object (Issue #47)

Added basic date-based validation on embargo/expiry fields.

This took an age to work out how to do - the "secret" seems to have been use of getCMSValidator(), as validator() on a DataExtension was no use AFAICT.

As a side note, the extension currently uses "Requested" and "Published"/"Unpublished" in the form-field labels which I find confusing, so have modified the latter to show as "Scheduled" which myself and Paul (Designer) think is more intuitive.

There is also a minor issue when validation errors bubble-up to the UI from the "Publishing Schedule" tab, where the main pane reloads itself, the "Content" tab's content is shown, and users need to manually switch back to the "Publishing Schedule" tab, in order to see the messages. I think this is OK for current purposes, but should be addressed if this sort of automated "tab switching" is do-able.

One more thing is that the expiry and embargo dates need to be shown to any approving users in their reports, as it is these dates they are approving as well as the content/copy changes.