[Rt-commit] rt branch, 4.4/multiselect-list-bulk, created. rt-4.4.1-303-g378d63e

Brian Duggan brian at bestpractical.com
Thu Feb 2 12:00:58 EST 2017


The branch, 4.4/multiselect-list-bulk has been created
        at  378d63ed90203df5913fe114900bf2bc63330199 (commit)

- Log -----------------------------------------------------------------
commit 378d63ed90203df5913fe114900bf2bc63330199
Author: Brian C. Duggan <brian at bestpractical.com>
Date:   Wed Feb 1 13:10:21 2017 -0500

    Make BulkCustomFields pass MaxValues to EditCustomField*
    
    EditCustomFieldSelect requires MaxValues to determine the button style
    for new-style CFs. BulkCustomFields still passes Multiple for
    old-style CFs, mirroring prior art in /Elements/EditCustomField.
    
    /Elements/EditCustomField derives RenderType from the CF if not passed
    as an argument, obviating the need for BulkCustomFields to pass
    it. This also mirrors /Elements/EditCustomField.
    
    Tested with all combinations of single and multi-select boxes. I
    checked that the 'add value' button type allowed selecting one value or
    multiple values, and that the 'delete value' button type always
    allowed for selecting multiple values, while the render type matched
    the CF.
    
    Fixes: #180568

diff --git a/share/html/Elements/BulkCustomFields b/share/html/Elements/BulkCustomFields
index 767f3b0..364cbfd 100644
--- a/share/html/Elements/BulkCustomFields
+++ b/share/html/Elements/BulkCustomFields
@@ -60,10 +60,10 @@
 % my $rows = 5;
 % my $cf_id = $cf->id;
 % my @add = (NamePrefix => 'Bulk-Add-CustomField-', CustomField => $cf, Rows => $rows,
-%   Multiple => ($cf->MaxValues ==1 ? 0 : 1) , Cols => 25,
+%   MaxValues => $cf->MaxValues, Multiple => ($cf->MaxValues == 1 ? 0 : 1) , Cols => 25,
 %   Default => $ARGS{"Bulk-Add-CustomField-$cf_id-Values"} || $ARGS{"Bulk-Add-CustomField-$cf_id-Value"}, );
 % my @del = (NamePrefix => 'Bulk-Delete-CustomField-', CustomField => $cf,
-%   Rows => $rows, Multiple => 1, Cols => 25,
+%   MaxValues => 0, Rows => $rows, Multiple => 1, Cols => 25,
 %   Default => $ARGS{"Bulk-Delete-CustomField-$cf_id-Values"} || $ARGS{"Bulk-Delete-CustomField-$cf_id-Value"}, );
 % if ($cf->Type eq 'Select') {
 <td><& /Elements/EditCustomFieldSelect, @add &></td>

-----------------------------------------------------------------------


More information about the rt-commit mailing list