Hi,
I'm trying to add some more custom field types. Not having any experience of Clearsilver or Javascript I've started with a simple one.

<<<From the .ini file>>>

[ticket-custom]
mycustomfield = integer
mycustomfield.label = My Integer Custom Field
mycustomfield.value = 0


In the ticket.cs and newticket.cs files I've added the following code to the section that creates the input controls.

elif:field.type == 'integer' ?><input type="text" id="<?cs
   var:name(field) ?>" name="integer_<?cs
   var:name(field) ?>" value="<?cs var:newticket[name(field)] ?>"
   onchange="javascript:checkint(this);"


The checkint function simply resets the value of the input control to the default value if the new value is not a number. That bit all works.

The problem is that when I submit the changes the new value does not get entered. No change shows up in the change log and the displayed value for the field stays the same.

What do I need to change to get the field to persist?

I've had a look in web_ui.py, api.py and model.py but I can't find anything that would be stopping the saving of the new value simply because the custom_field type is "integer".

Thanks for any pointers on how this all works.

Regards,
Felix
_______________________________________________
Trac mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac

Reply via email to