[Rt-devel] Making the Requestor field a selection field?
Todd Chapman
rt at chaka.net
Thu Oct 7 14:37:40 EDT 2004
Looking in CreateTicket sub of /opt/rt3/lib/RT/Interface/Web.pm
-Todd
On Thu, Oct 07, 2004 at 02:07:21PM -0400, Matt Hanley wrote:
> When creating a new ticket, I wanted to be able to have the Requestors field
> be a drop down list of currently existing users (this made things simple and
> allowed for the real name to be displayed while the email address still gets
> used). I managed to do this easily by modifying Ticket/Create.html and
> adding a file, mwh.html:
>
> --- /opt/rt3/share/html/Ticket/Create.html 2004-07-12
> 14:00:53.000000000 -0400
> +++ ./Create.html 2004-10-07 13:49:41.000000000 -0400
> @@ -55,7 +55,7 @@
> <&|/l&>Requestors</&>:
> </TD>
> <TD class=value COLSPAN=5>
> -<INPUT Name="Requestors" Value="<% ($ARGS{Requestors}) ||
> $session{CurrentUser}->EmailAddress %>" SIZE=40>
> +<& /Ticket/mwh.html &>
> </TD>
> </TR>
> <TR>
>
> mwh.html:
>
> <SELECT NAME="Requestors">
> %while ( my $u = $Users->Next() ) {
> % if ( $u->RealName() ne"" ) {
> <OPTION VALUE="<%$u->EmailAddress()%>"><%$u->RealName()%></OPTION>
> % }
> %}
> </SELECT>
>
> <%INIT>
> my $Users = RT::Users->new($session{CurrentUser});
> </%INIT>
>
>
> However, I realized that this didn't leave the option for selecting multiple
> Requestors. No problem, I thought, I'll just add the "multiple" option to
> the "SELECT" tag. Now, however, the Requestor turns into
> "ARRAY(0xa282c38)". I understand what that value is, but I'm not finding
> where this is being processed. If someone could at the very least point me
> there, that'd be great. If someone has the solution, even better. :-)
>
> Thanks!
>
> -matt
>
> Matthew Hanley
> mhanley at cxtec.com
> _______________________________________________
> Rt-devel mailing list
> Rt-devel at lists.bestpractical.com
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
More information about the Rt-devel
mailing list