You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2008-03-04 13:34:39

theh1982
Member
Registered: 2008-01-22
Posts: 25

Adding a "request source"

Hi am trying to add another request source in the standard "ticket" and i seen that in the Tracking table there is a request_source which is a small integer (1 to 6 ) only i cannot see where it will take the Names from (i presume there is some dropdown code in one of the php scripts).

Can anyone help my on my way ?

Thanks,

Offline

#2 2008-03-04 19:50:26

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: Adding a "request source"

you must to modify dropdownRequestType function


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

#3 2008-03-05 11:54:22

theh1982
Member
Registered: 2008-01-22
Posts: 25

Re: Adding a "request source"

function dropdownRequestType($name,$value=0){

        global $LANG;



        echo "<select name='$name'>";

        echo "<option value='0' ".($value==0?" selected ":"").">-----</option>";

        echo "<option value='1' ".($value==1?" selected ":"").">".$LANG["Menu"][31]."</option>"; // Helpdesk

        echo "<option value='2' ".($value==2?" selected ":"").">".$LANG["setup"][14]."</option>"; // mail

        echo "<option value='3' ".($value==3?" selected ":"").">".$LANG["title"][41]."</option>"; // phone

        echo "<option value='4' ".($value==4?" selected ":"").">".$LANG["tracking"][34]."</option>"; // direct

        echo "<option value='5' ".($value==5?" selected ":"").">".$LANG["tracking"][35]."</option>"; // writing

        echo "<option value='6' ".($value==6?" selected ":"").">".$LANG["common"][62]."</option>"; // other



        echo "</select>";

}

Thanks , i found the function but let say if i add

echo "<option value='7' ".($value==7?" selected ":"").">".$LANG["common"][62]."</option>"; // On-Call

then i presume that the name "on-call" needs to be defined in the global $LANG variable ? Cause the names are added at the end as comments.

So what i understand this function uses data from the $LANG Array but since $LANG["common"][62] is used all over the code as well i am really confused...

Last edited by theh1982 (2008-03-05 12:18:09)

Offline

#4 2008-03-06 01:08:40

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: Adding a "request source"

you need to define your string in dictionnary if you want to use translation.
If you use only one langage you can hardcoded it.


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

Board footer

Powered by FluxBB