[rt-users] custom field type, checkboxes
Joel Schuweiler
jschuweiler at fonality.com
Mon Mar 3 18:13:44 EST 2008
I personally did the following in my EditCustomFieldSelect (in my local dir)
<%method options>
% my $selected;
% my $CFVs = $CustomField->Values;
% my @levels;
% while ($CFVs and my $value = $CFVs->Next )
% {
% if ($CustomField->MaxValues == 0 )
% {
<input type="checkbox" style="border: none;"
value="<%$value->Name%>"
% if ($Values)
% {
<% $Values->HasEntry($value->Name) && ($$SelectedRef
= 1) && 'CHECKED' %>
% }
% elsif ($Default)
% {
<% (ref $Default ? (grep {$_ eq $value->Name}
@{$Default}) : ($Default eq $value->Name))
&& ($$SelectedRef = 1) && 'CHECKED' %>
% }
><% $value->Name%><br>
% }
% else
% {
<option value="<%$value->Name%>"
% if ($Values)
% {
<% $Values->HasEntry($value->Name) &&
($$SelectedRef = 1) && 'SELECTED' %>
% }
% elsif ($Default)
% {
<% (ref $Default ? (grep {$_ eq $value->Name}
@{$Default}) : ($Default eq $value->Name))
&& ($$SelectedRef = 1) && 'SELECTED' %>
% }
><% $value->Name%></option>
% }
% }
Todd Chapman wrote:
> Does this help?
>
> http://lists.bestpractical.com/pipermail/rt-users/2007-November/048774.html
>
> On 3/2/08, Jan Grant <jan.grant at bristol.ac.uk> wrote:
>
>> On Sun, 2 Mar 2008, Todd Chapman wrote:
>>
>> > This would be easy enough to do. There is a callback in 3.6 that lets
>> > you control what Mason component is used to render a custom field.
>>
>>
>> Can you supply some details, or a pointer to this?
>>
>>
>> --
>> jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
>> Tel +44 (0)117 3317661 http://ioctl.org/jan/
>> ...You're visualising the _duck_ taped over my _mouth_..?
>>
>>
More information about the rt-users
mailing list