Commit 849c9931 authored by Jim Brandt's avatar Jim Brandt
Browse files

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'.
parent fcd6bf4d
......@@ -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,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment