[rt-users] Select or enter Requestor-Email-Address - Problem is resolved [ Virus checked by www.virusguard.de ]

Matthias Fenner Matthias.Fenner at advanced.info
Tue Feb 8 08:05:53 EST 2005


I dont find the thread again ... but I think here is somthing a few people asked for:

<script>
function checkAdd(theSel){
 if(theSel.selectedIndex==(theSel.options.length-2)){
   newOpt=prompt("Bitte Email-Adresse eingeben:","")
   if(newOpt>""){
     theSel.options[theSel.selectedIndex].text=newOpt;
     theSel.options[theSel.options.length]=new Option("Email-Adresse eingeben...");
   }
 }
}
</script>

<SELECT onChange="checkAdd(this)" NAME="Requestors">
%while ( my $u = $Users->Next() ) {
%  if ( $u->RealName() ne"" ) {
<OPTION VALUE="<%$u->EmailAddress()%>"><%$u->EmailAddress()%></OPTION>
%  }
%}
<option>-----------------------------------------</option>
<option>Email-Adresse eingeben...</option>
<option selected>-----------------------------------------</option>
</SELECT>

<%INIT>
my $Users = RT::Users->new($session{CurrentUser});
</%INIT>
 

If yout substitute 

<INPUT Name="Requestors" Value="<% ($ARGS{Requestors}) || $session{CurrentUser}->EmailAddress %>" SIZE=40>

with the above code in Ticket/Create.html , you will be able to select existing requestors or enter one by yourself




More information about the rt-users mailing list