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 2015-08-29 00:16:14

Jamal
Member
Registered: 2015-08-29
Posts: 1

Hiding Fields from templates

hello
is there a way to hide or remove fields from templates
for example removing brand and comment from the "add a device"  shown in the picture below
http://pplware.sapo.pt/wp-content/uploa … _thumb.jpg

running latest glpi

Offline

#2 2015-08-30 07:40:47

9mik09
Member
Registered: 2015-08-18
Posts: 21

Re: Hiding Fields from templates

I think yes. hide comment in Network device
You need to find the line in some files and add the /* and */
I am a noob (noob saibot wink ), I opened the file en_US.po (glpi/locales/) Search 'Network device' - 4 matches.
-----------
fragment from en_US.po

#: inc/computer.class.php:510 inc/computer.class.php:782
#: inc/dropdown.class.php:826 inc/network.class.php:43
#: inc/networkequipment.class.php:86 inc/networkequipment.class.php:344
#: inc/networkequipment.class.php:533 inc/printer.class.php:379
#: inc/printer.class.php:669 inc/profile.class.php:786
#: inc/profile.class.php:1536
msgid "Network"
msgid_plural "Networks"
msgstr[0] "Network Device"
msgstr[1] "Networking Devices"
----------
networkequipment.class.php or network.class.php - intuitively it here
opened, search: comment. in networkequipment.class.php find word comment
add /* */ for code, save file

/*      echo "<tr class='tab_bg_1'>";
      echo "<td>".__('Group')."</td>";
      echo "<td>";
      Group::dropdown(array('value'     => $this->fields["groups_id"],
                            'entity'    => $this->fields["entities_id"],
                            'condition' => '`is_itemgroup`'));
      echo "</td>";
      echo "<td rowspan='$rowspan'>".__('Comments')."</td>";
      echo "<td rowspan='$rowspan'>
            <textarea cols='45' rows='".($rowspan+3)."' name='comment' >".$this->fields["comment"];
      echo "</textarea></td></tr>";*/

      
it working, but you see "comment" from this tempate in other tab (dropdown, search etc)
my english is bad, I can not explain better

Offline

Board footer

Powered by FluxBB