[Rt-devel] RT 3.6 PATCH: Give Freeform form elements an id

Todd Chapman todd at chaka.net
Thu Jun 22 23:07:47 EDT 2006


Once this patch is applied, it will be easier to use
the 3.6 date picker on custom fields. An extension will
be created to do just that. :)
-------------- next part --------------
==== Patch <freeform> level 1
Source: [No source]
Target: e417ac7c-1bcc-0310-8ffa-8f5827389a85:/rt/branches/3.6-RELEASE:5408
        (svn://svn.bestpractical.com)
Log:
Give Freeform form elements an id. This will be useful
in combination with the EditComponentName callback.
With a few local mods, date CFs will be able to use the
date picker. Without an id the date picker doesn't work.
=== html/Elements/EditCustomFieldFreeform
==================================================================
--- html/Elements/EditCustomFieldFreeform	(revision 5408)
+++ html/Elements/EditCustomFieldFreeform	(patch freeform level 1)
@@ -43,10 +43,11 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
+% my $name = $NamePrefix . $CustomField->Id . '-Value';
 % if ($Multiple) {
-<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$NamePrefix%><%$CustomField->Id%>-Values"><%$Default%></textarea>
+<textarea cols="<%$Cols%>" rows="<%$Rows%>" name="<%$name%>s" id="<%$name%>s" ><%$Default%></textarea>
 % } else {
-<input name="<%$NamePrefix%><%$CustomField->Id%>-Value" size="<%$Cols%>" value="<%$Default ? $Default : ''%>" />
+<input name="<%$name%>" id="<%$name%>" size="<%$Cols%>" value="<%$Default ? $Default : ''%>" />
 % }
 <%INIT>
 if ($Multiple and $Values) {

==== BEGIN SVK PATCH BLOCK ====
Version: svk 1.07 (linux)

eJyFVF1v0zAU3XO1N/6ANbkaSLRN4mRNuy0qGi1CwDRtYzwWJ7lZrTlxlbjrJowA8QNA2h/m2u0+
hbSXxPfjnHN9700m9enuyDdJ4hnqe+bk7MNweMR1NmujRXcM5EKrmkZGwiVIyoxU5zQ0FS8Bo5rX
56CTxEdwvAKPHeCWJLQcKdeqaujAkU11DUB9E44iMwrMiCHU+BhUc6imtVIa6ft+FGFwakvKpGpg
aqE2PbLpAfXDVX4uashQ7xpBM11Kx7XGM4uP1vj7RMy4I2L/IfKZY+qNJZRQ6cbpPUcZ3FGGt1cp
hATK+o/JerY9B4tGq3IiQOYTbEah6tLV8pwIW4m4KJ/P5fVUw5XOQWruhFlgIsYHccaCyCvyMPCK
Pks91oc0zQs/B4/RILRzOtzYuDm/+bH56+vGn82Nn/j6/eLvaXlNqB0s2Sf0EN9HNRTiinQJfVBx
J3mfo2u7c8blArZ3W20iCvKSflpILeYSXpFvrT1bF6+Bk0zJZn9rr00P8NBOtkitlivHMR6swwo6
hz20k2aLiPyxnaDxFgqOAu1kr3fLnaDydwKyAasoqvlCPyV7wjUKH26Um8+6bWnEPS8Medr3Yg6Q
h3mIlr+T+nkGLIzcWgX+wLwTl0Buh0bcA9ajJbxCuS45nYmGLIWUJAWyaKBYyJaosBNlKiquhaow
qmdEz4C4bVDlXFXIYFtOMi5lyrOLbuuLTeKkgCWRCt2kVHnzmuRcAzmY3EvwVALRykpZzpZLmIvs
AuousSQKG+Nqc5IPwiRX0FTbmixVfdGlsSnWF0uSwNAgWH3Qp+4bHw4/V3j3uuGyvWNwVedcz/B3
UMMlGouFyHG1TK/WvbTmVTaDpse6O53j8cfxm5MxpkShF1OGP5TQ7/Osn3X8NMs6HvO9TlwUHB9R
HPRZPOBx9A+AAH6Q
==== END SVK PATCH BLOCK ====


More information about the Rt-devel mailing list