Problem/Motivation
When creating or editing a digest the cron english translation only updates when the cron entered is valid. While this does not present an immediate problem, it does remove some intuition about what the user has written.
It may be useful to show the text 'invalid cron' or similar when an invalid expression is entered. Obviously the form errors will still appear when trying to submit an invalid response but no error is displayed through ajax and this could be confusing.
Steps to reproduce
Create or edit a digest and enter an invalid cron string for the send at field. The value of the output will not change.
Proposed resolution
When invalid expression are run through the ajax callback set the output text to 'Invalid cron' and optionally try setting an error on the element.
This is caused from validate form failing at creating the translation. Perhaps there is a way around running that if the form is currently in an ajax call.
Comments