[Rt-commit] r2982 - rt/branches/CHALDEA-EXPERIMENTAL/html/Search
autrijus at bestpractical.com
autrijus at bestpractical.com
Mon May 30 01:38:51 EDT 2005
Author: autrijus
Date: Mon May 30 01:38:51 2005
New Revision: 2982
Modified:
rt/branches/CHALDEA-EXPERIMENTAL/html/Search/Bulk.html
Log:
* refactor out common code for Bulk.html.
* add Combobox handling to Bulk.
Modified: rt/branches/CHALDEA-EXPERIMENTAL/html/Search/Bulk.html
==============================================================================
--- rt/branches/CHALDEA-EXPERIMENTAL/html/Search/Bulk.html (original)
+++ rt/branches/CHALDEA-EXPERIMENTAL/html/Search/Bulk.html Mon May 30 01:38:51 2005
@@ -163,16 +163,24 @@
<tr>
<td class="label"><%$cf->Name%><br>
<i>(<%$cf->FriendlyType%>)</i></td>
+% my $rows = 5;
+% my @add = (NamePrefix => 'Bulk-Add-CustomField-', CustomField => $cf, Rows => $rows, Multiple => ($cf->MaxValues ==1 ? 0 : 1) , Cols => 25);
+% my @del = (NamePrefix => 'Bulk-Delete-CustomField-', CustomField => $cf, Rows => $rows, Multiple => 1, Cols => 25);
% if ($cf->Type eq 'Select') {
-<td><& /Elements/EditCustomFieldSelect, NamePrefix => 'Bulk-Add-CustomField-', CustomField => $cf, Rows => 5, Multiple => ($cf->MaxValues ==1 ? 0 : 1) &></td>
-<td><& /Elements/EditCustomFieldSelect, NamePrefix => 'Bulk-Delete-CustomField-', CustomField => $cf, Rows => 5, Multiple => 1&></td>
+<td><& /Elements/EditCustomFieldSelect, @add &></td>
+<td><& /Elements/EditCustomFieldSelect, @del &></td>
+% } elsif ($cf->Type eq 'Combobox') {
+<td><& /Elements/EditCustomFieldCombobox, @add &></td>
+<td><& /Elements/EditCustomFieldCombobox, @del &></td>
% } elsif ($cf->Type eq 'Freeform') {
-<td><& /Elements/EditCustomFieldFreeform, NamePrefix => 'Bulk-Add-CustomField-', CustomField => $cf, Rows => 5, Multiple => ($cf->MaxValues ==1 ? 0 : 1), Cols => 25 &></td>
-<td><& /Elements/EditCustomFieldFreeform, NamePrefix => 'Bulk-Delete-CustomField-', CustomField => $cf, Rows => 5, Multiple => ($cf->MaxValues == 1 ? 0 : 1), Cols => 25 &></td>
+<td><& /Elements/EditCustomFieldFreeform, @add &></td>
+<td><& /Elements/EditCustomFieldFreeform, @del &></td>
% } elsif ($cf->Type eq 'Text') {
-<td><& /Elements/EditCustomFieldText, NamePrefix => 'Bulk-Add-CustomField-', CustomField => $cf, Rows => 5, Multiple => ($cf->MaxValues ==1 ? 0 : 1) , Cols => 25 &></td>
+<td><& /Elements/EditCustomFieldText, @add &></td>
<td> </td>
-% }
+% } else {
+% $RT::Logger->crit("Unknown CustomField type: " . $cf->Type);
+% }
</tr>
% }
</table>
More information about the Rt-commit
mailing list