[Bps-public-commit] rt-extension-formtools branch, master, updated. 0.16-10-g849c993

Jim Brandt jbrandt at bestpractical.com
Wed Jun 11 10:54:43 EDT 2014


The branch, master has been updated
       via  849c99312ef9b2242095bea0e99b521cda397bbb (commit)
      from  fcd6bf4db066ce6aa83c948e23a8d83e44836a22 (commit)

Summary of changes:
 html/FormTools/Field | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit 849c99312ef9b2242095bea0e99b521cda397bbb
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Wed Jun 11 09:06:19 2014 -0400

    Remove queue object from EditCustomField call
    
    The Object passed to EditCustomField should be the type the
    custom field is applied to. Passing the queue object would only
    be correct for queue cfs, which is not a typical case. For ticket
    cfs, the typical case, passing the queue object creates an incorrect
    name in the form and the cf isn't processed properly on submit.
    
    EditCustomField can generate the correct form element from the
    passed CustomField object.
    
    This issue has likely not been noticed because the queue object is
    only set when you pass it via 'notes'.

diff --git a/html/FormTools/Field b/html/FormTools/Field
index cb493ad..8f71448 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -187,7 +187,7 @@ $default = '' unless defined $default;
 % if ($render_as eq 'hidden') {
     <input type="hidden" class="hidden" name=<% $input_name %> value="<% $default %>">
 % } elsif ($render_as eq 'normal') {
-    <& /Elements/EditCustomField, Object => $queue, CustomField => $cf,
+    <& /Elements/EditCustomField, CustomField => $cf,
             ($cf->Type =~ /text/i) ? (Cols => $cols ||60) : (),
             ($cf->Type =~ /freeform/i) ? (Cols => $cols ||30) : (),
             Rows => $rows || 6,

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


More information about the Bps-public-commit mailing list