[Rt-devel] RT 3.6 PATCH: Callback to add validation patterns to
drop-down
Todd Chapman
todd at chaka.net
Fri Jun 23 01:17:46 EDT 2006
Add callback so that pre-defined validations can be added to the drop-down.
-------------- next part --------------
==== Patch <validations> level 1
Source: [No source]
Target: e417ac7c-1bcc-0310-8ffa-8f5827389a85:/rt/branches/3.6-RELEASE/html/Admin/CustomFields:5407
(svn://svn.bestpractical.com)
Log:
Add callback so that pre-defined validations can be added to the drop-down.
=== Modify.html
==================================================================
--- Modify.html (revision 5407)
+++ Modify.html (patch validations level 1)
@@ -83,11 +83,7 @@
Name => 'Pattern',
Default => $CustomFieldObj->Pattern,
Size => 20,
- Values => [
- '(?#Mandatory).',
- '(?#Digits)^[\d.]+$',
- '(?#Year)^[12]\d{3}$',
- ],
+ Values => \@CFvalidations,
&>
</td></tr>
</tr>
@@ -146,6 +142,13 @@
my ( $title, @results, $EnabledChecked, $Disabled);
$EnabledChecked = "CHECKED";
+my @CFvalidations = (
+ '(?#Mandatory).',
+ '(?#Digits)^[\d.]+$',
+ '(?#Year)^[12]\d{3}$',
+);
+$m->comp('/Elements/Callback', _CallbackName => 'ValidationPatterns', Values => \@CFvalidations );
+
if ( !$id ) {
$title = loc("Create a CustomField");
$id = 'new';
==== BEGIN SVK PATCH BLOCK ====
Version: svk 1.07 (linux)
eJxdks1u1DAUhbNEPABi6UWqthJp4vxnqkZTjWY2QIVoqVggRY5904lw4sjxTBlhEDwAYoUoL8Bj
IB4NJ9NBAxsr9jn3883xXcir0ynWee5pG3v68vrpZPKCKLo8MDs71sBqJaQdaQ5r4HagubixQ92S
BoyqiLwBlefYFKfb4vlYsIOEA6MkSrS9nY2wQkkAG2t/Guipr81qNtiIooO2kEIog09wFBmxGFqi
XPRQDKWDPRrs/s5e1dywsH4uWF1tTpaq4SPtnhAMhOiewGoJ1LS2GRxb1KiSruObQsE7xYArMuID
X+MyCbyA+qGfQYghpFXq0aoMKqAVo1ls42SI68Kyfr3/bT36/MC6m1hfrS/1j8ffrNd3p5+Y9f3D
z49vprPFmvCaEVWbEJoN+vcAnaGj49OHduPkVDTd0aE759BAq3p3RjgvCX17+AQVu+8Lkzs6y9Hh
9V+ECVqBbHtjM4cr6Af9v2vR8TTcT3Ob2/ZH0zJOfK/MoqwCRmMKVQZJ5lUhwVmcEW8MNIn0OWOI
3reBeoHUkijUSXAYVHULDO3fR0mLSkCEMSOowQyISdE5TNy2J8OT7bnz3Ne272/n52ocqcnkVVuv
QfaEH8TavGdH1NJMn4S12axWNbPDVLtSuaUkLV1C7wYnsfNy/mx+fjl3h0Fwz1lTt+5s1SvRLGrg
rDelUegldmDmOsQJoQl1cEmp4wXYc9KqImaJUj8J0oyk0R8t+gZX
==== END SVK PATCH BLOCK ====
More information about the Rt-devel
mailing list