Closed (fixed)
Project:
Scheduler
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
31 Jul 2013 at 16:50 UTC
Updated:
16 Jan 2014 at 19:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
les limPatch attached.
Comment #2
jonathan1055 commentedThis looks useful. Thanks for the patch, I will give it a try.
Jonathan
Comment #3
jonathan1055 commentedThis is a nice enhancement, thanks for coding it. Basically it all works fine, but here are a few modifications that you may like to consider:
I only tested this with the built-in jQuery timepicker provided by Date Popup. Have you tried it with the wvega-timepicker option?
Jonathan
Comment #4
jonathan1055 commentedFour months have passed, so I thought I would pick this up and make the changes I suggested. In addition, the entry field is disabled if the timepicker is set to 'none' i.e. plain text entry.
The patch is against the code in git as of 7th Dec, which is newer than the -dev version of 18th Nov shown on project page.
Jonathan
Comment #5
pfrenssenThis is a good addition, this can clear up confusion for content editors on websites that have their cron running e.g. every 15 minutes. Committed to 7.x-1.x: commit 8d75bbeeb. Thanks!!
Comment #6
jonathan1055 commentedJust found a slight problem with this. If the value is blanked out in the the Scheduler admin settings then the minutes cannot be changed at all in the time-picker.
I would have thought that the above validation would not allow a blank to be saved. I guess our options would be either to validate and not allow blank, or set #required to true, or simply reset to the default of 1 minute.
Any other ideas?
Comment #7
pfrenssenWoops! Let's make it required and default to "1" if it is not previously filled in, that seems like the best solution to me. I'll roll a patch, I have some time now.
Comment #8
pfrenssenMade the field required, and make sure it defaults to "1", even if the setting has previously been submitted using an empty string.
Comment #9
jonathan1055 commentedIf we have #required then we also should specify the default in the description and explain in more detail why the field is required. As it is a new option the admin might just erase it thinking they do not want to use it.
An alternative is just to change blank to 1 in the submit handler. Saves the admin having to do anything, and shows immediately that 1 is the default if you erase and save. Patch attached.
Comment #10
pfrenssenFine by me! I updated the comment to explain the "why" in addition to the "what" and committed to 7.x-1.x: commit 64ed6abc99. Thanks!!