Making end date 'optional' and validation of input

ekes - June 12, 2006 - 18:30
Project:Event
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:ekes
Status:duplicate
Description

Presently the default 'now' values are a hinderance - and lead to incorrectly filled forms.
Events can have just a start (by having the same end time) but this isn't clear.
There seems to be little user input validation.

Proposed solution:

Make 'end' clearly optional. Say so and have it blank by default.
Add validation checks, that can also handle blank end dates.

Notes:

Validation is ruthless, it maybe worth changing some to 'use default value' and drupal_set_message. Rather than form_set_error? If so which ones, when?
Added an id tag to make it possible for future js to enable optional auto-filling of end time form start

AttachmentSize
event.20060612.patch.txt9.93 KB

#1

RayZ - July 20, 2006 - 23:23
Title:Making end date 'optional' and vaildation of input» Making end date 'optional' and validation of input
Category:task» feature request

#2

dodazzi - July 23, 2006 - 10:08

This sounds like a useful feature. But I think that this patch doesn't apply to the last event module. I run the patch and two trunks failed. These are the results of the patching process:

patching file event.module
Hunk #1 succeeded at 1073 (offset -8 lines).
Hunk #2 succeeded at 1310 (offset -8 lines).
Hunk #3 FAILED at 1418.
Hunk #4 succeeded at 1452 (offset -8 lines).
Hunk #5 succeeded at 1522 (offset 6 lines).
Hunk #6 succeeded at 1873 (offset 6 lines).
Hunk #7 FAILED at 1885.
Hunk #8 succeeded at 1985 (offset 43 lines).
Hunk #9 succeeded at 2009 (offset 43 lines).
2 out of 9 hunks FAILED -- saving rejects to file event.module.rej

Anyone knows how to update this patch?
Any plan to include this feature in core?

Thanks for this great module.

#3

charlesc - September 21, 2006 - 10:11
Category:feature request» support request

I manually patched the event.module and build a patch file for it.

AttachmentSize
event-end.patch.txt 8.49 KB

#4

csc4 - February 23, 2007 - 20:28

This seems like a really useful patch - is there any chance of it being committed?

#5

killes@www.drop.org - May 1, 2007 - 21:46

I think a imple text below the form which explains how it works would be better.

#6

BobLouis - May 25, 2007 - 16:16
Version:4.7.x-1.x-dev» 5.x-1.x-dev

The above patch doesn't seem to apply to 5.1 version.

Is there a way to solve this issue :
- make end date optional
- validate start date and end date (eg: start date >= today, end date >= start date, etc.)

I understand we can use the Forms API. If that is the solution, could someone give an example of the code to use to perform date format checks (since I am not a php programmer at all!).

Your help is appreciated!

#7

Michelle - May 29, 2007 - 04:22
Status:needs review» duplicate

See http://drupal.org/node/147558 to co-ordinate discussion of UI change.

Michelle

 
 

Drupal is a registered trademark of Dries Buytaert.