Ticket #635 (closed enhancement: fixed)

Opened 5 months ago

Last modified 2 months ago

Add support of the required attribute on <checkbox>

Reported by: bballizlife Assigned to: Julien
Priority: normal Milestone: Jelix 1.1 beta 1
Component: jelix:forms Version: trunk
Severity: normal Keywords:
Cc: Php version:
Review: review+ Hosting Provider:
Documentation needed: 0 Blocking:
Blocked By: 636

Description

On the <checkbox> element, we cannot use the attribute required.

This attribute should be allowed as it could be usefull if you want to create a form with a checkbox user must tick (accept conditions when signin for example).

Attachments

635-jForms-add-support-of-the-required-attribute-on-checkebox.diff (2.2 kB) - added by Julien on 09/11/08 18:04:12.
635-jForms-add-support-of-the-required-attribute-on-checkebox.2.diff (7.0 kB) - added by Julien on 09/23/08 17:31:09.
updated patch with unit tests and updated relaxNG shcemas

Change History

06/27/08 13:58:35 changed by laurentj

accept conditions when signin for example

Well, if the user doesn't want to accept conditions, this is not an error :-p

Personnally, in this case, I think I would prefer to redirect to another page with a "cancel" message or something like that.

It's strange to me to treat this as an "error"...

But why not..

06/27/08 14:02:48 changed by bballizlife

In this case, accepting conditions (and so ticking the box) is mandatory to access a service. Without that you cannot suscribe.

So the action of ticking a checkbox could be required so as giving a valid email address.

07/02/08 09:03:14 changed by bballizlife

So what about this ticket ? Accepted ? Invalid ?

As i said above, i really think this should be implemented.

07/02/08 16:27:47 changed by bastnic

I also need that for one of my current project.

07/16/08 00:30:05 changed by laurentj

Ok. Make a patch :-)

09/10/08 23:37:32 changed by Julien

  • owner set to Julien.
  • status changed from new to assigned.

I take this one as I need it in the next few days...

09/11/08 18:04:12 changed by Julien

  • attachment 635-jForms-add-support-of-the-required-attribute-on-checkebox.diff added.

09/11/08 18:07:27 changed by Julien

  • review set to review?.

Here's the patch.

For the moment, Javascript check doesn't work, but it will as soon as #636 is committed.

I don't know if I should update relaxNG schemas, I'm not very friendly with that. If I should, let me know, I'll try and learn ;)

09/12/08 10:55:15 changed by laurentj

The patch is ok (except the javascript issue), but I really would like to have unit test.

09/12/08 14:09:26 changed by Julien

Ok I'll try writing tests.

What about RelaxNG shemas ? Should I update them in the patch ?

09/12/08 14:27:38 changed by laurentj

  • review changed from review? to review-.

yes, you should :-) You'll see, RelaxNG is very easy :-)

09/23/08 17:31:09 changed by Julien

  • attachment 635-jForms-add-support-of-the-required-attribute-on-checkebox.2.diff added.

updated patch with unit tests and updated relaxNG shcemas

09/23/08 17:33:01 changed by Julien

  • review changed from review- to review?.

patch to review, with unit tests and updated RelaxNG schemas (hope I've done right with these)

09/23/08 18:33:23 changed by laurentj

  • review changed from review? to review+.

It seems ok for me. thanks for the patch :-)

09/23/08 18:36:54 changed by Julien

nice ;)

please take a look at #636, because it should be commited first, so javascript will work here.

Thanks

09/24/08 12:09:38 changed by Julien

  • status changed from assigned to closed.
  • resolution set to fixed.

committed in the trunk

Download in other formats: Comma-delimited Text Tab-delimited Text RSS Feed