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 2019-12-20 18:39:17

AndrewG
Member
Registered: 2019-11-27
Posts: 11

Add Location Field to network card

Hello,

    As the title states I would like to add the location field to my network cards so that when I look at all the items at a location the network cards will show. I have successfully added the network card to the items list on location and now I am trying to add the location field to the card I am not very good with php ( very limited experience )  but I figured with looking at the other files for a reference I would be able to do it. so far I have added

['name'  => 'locations_id',
          'label' => __('Location'),
          'type'  => 'dropdownValue'],


to the file glpi/inc/devicenetworkcard.class.php and now the field does appear when I look into a network card BUT when I click the drop down and add a location and save it it doesn't actually end up saving it.. I hoped I could do this easily but it seems like I will have to put a lot of effort into this.. i'm hoping somebody here can help me achieve what I want to achieve.

Any help would be greatly apricated

Offline

#2 2019-12-20 21:57:45

AndrewG
Member
Registered: 2019-11-27
Posts: 11

Re: Add Location Field to network card

Making the same change to devicegeneric.class.php has worked now I just need to figure out why it works for one of the components but not the other.

Offline

#3 2020-01-14 15:30:57

iosman000
Member
Registered: 2019-11-19
Posts: 2

Re: Add Location Field to network card

AndrewG wrote:

Hello,

    As the title states I would like to add the location field to my network cards so that when I look at all the items at a location the network cards will show. I have successfully added the network card to the items list on location and now I am trying to add the location field to the card I am not very good with php ( very limited experience )  but I figured with looking at the other files for a reference I would be able to do it. so far I have added

['name'  => 'locations_id',
          'label' => __('Location'),
          'type'  => 'dropdownValue'],


to the file glpi/inc/devicenetworkcard.class.php and now the field does appear when I look into a network card BUT when I click the drop down and add a location and save it it doesn't actually end up saving it.. I hoped I could do this easily but it seems like I will have to put a lot of effort into this.. i'm hoping somebody here can help me achieve what I want to achieve.

Any help would be greatly apricated


thanks my issue has been fixed.

Offline

Board footer

Powered by FluxBB