"crud help" should be a separate tag

Bug #601713 reported by AMcBain
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
play framework
New
Undecided
Unassigned

Bug Description

The printed help section should be available via a separate tag to aid in custom fields on CRUD forms. It could print out the validators then append a custom message passed to the tag as well. The custom message would cover certain reasons for wanting to customize a field: custom message below. This would allow such without losing the validator messages or making the customizer write them back out again.

Tags: crud

Related branches

AMcBain (mcbain-asm)
description: updated
Revision history for this message
AMcBain (mcbain-asm) wrote :

Hmm, second inspection shows this to require a bit more setup. The currentType variable would also have to be passed along to the crud.custom tag body as well.

Revision history for this message
AMcBain (mcbain-asm) wrote :

Turns out this is much more useful if the entire label, field, help construction is extracted to its own tag and called from crud.form. This allows then a one line call to that tag from crud.custom and an optional parameter can be added there to add a custom message after the standard help is written out. Works nicely for my use-case.

Revision history for this message
AMcBain (mcbain-asm) wrote :
Revision history for this message
AMcBain (mcbain-asm) wrote :
Revision history for this message
AMcBain (mcbain-asm) wrote :
Revision history for this message
AMcBain (mcbain-asm) wrote :

I've attached some stuff to indicate what I've done and idea on handling this improvement ... it certainly may not be the best. Attached is a diff of my file and the original, hopefully in a usable format.

Revision history for this message
AMcBain (mcbain-asm) wrote :

Turns out I screwed up in a way that borked the file field. Attached is a patch for form.html which is one part in fixing that. This patch supersedes the other one I attached previously.

Revision history for this message
AMcBain (mcbain-asm) wrote :

Attached here is the updated field.html file (superseding the one I posted above) which with the patch I just posted, makes the file field work properly again.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.