Add CSS class to CRUD form fields indicating data type

Bug #530155 reported by Mark Schaake
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
play framework
Status tracked in 1.0
1.0
Fix Released
Undecided
Erwan Loisant
1.1
Fix Committed
Undecided
Erwan Loisant

Bug Description

Please add classes to the input tags auto-generated by CRUD to indicate the underlying datatype. For example:

Java -> CRUD-generated CSS Class
---------- -------------------------------------
Date -> crud_date
Integer -> crud_integer
Number -> crud_number
...

This is helpful when overriding the CRUD/layout.html template by being able to place one jQuery call to attach datepickers, etc.

Also (or maybe alternatively), would be nice to have an annotation available to add custom classes directly from within the model:

public class MyModel extends model {

    @CSSClass("datepicker") // 'datepicker' will get added to the CRUD input tag as an additional class
    public Date birthday;
    ...
}

Erwan Loisant (eloisant)
Changed in play:
assignee: nobody → Erwan Loisant (eloisant)
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.