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 2011-09-13 01:40:01

mitchell_miller
Member
Registered: 2011-09-13
Posts: 1

Hiding unused fields in forms

Hi guys,

I'm using GLPI currently and loving it. The guys who also use it were asking if there was a way to hide unused fields in the assistance screen.

Cheers,

Offline

#2 2011-09-13 02:50:07

abdon
Member
Registered: 2010-08-23
Posts: 101

Re: Hiding unused fields in forms

You have to modify the code, which is something you should not do without thinking long and hard about it. Any changes you make will be undone at the next upgrade, so you better document your changes and be prepared to manually reimplement them.

Having said that this is one of the mildest code changes you can perform. Making something not show up _should_not_ brake anything... You are fairly decent with PHP, right?

Just about every text you see via the browser comes from the language file in the locales/ folder. The easiest way to find where something being printed to the browser comes from, is to identify the language variable and then do a global search for the variable on the GLPI source code. For instance, let’s say you want to remove the impact pulldown. If you search the language file, you’ll find out that the $LANG[‘joblist’] [30] holds the value ‘Impact’, so searching for $LANG[‘joblist’] [30] shows you where it is being used.

This is actually the perfect example to the pitfalls of mucking with the code, as ‘Impact’ is used in a ton of places;(statistics, reports, etc) and if you actually find the instance you need to remove, the table formatting is hard coded on the script so you have to surgically modify the script for it to work right, and be willing to repeat the process every time you update the code.

If you still want to do it, the right place to search would be the /inc folder. The right script to modify should be ticket.class.php. Good luck.

Offline

#3 2011-09-13 09:48:34

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: Hiding unused fields in forms

In 0.83, with ticket's template you will be able to hide fields


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#4 2011-09-20 11:23:00

ksr0108
Member
From: Amsterdam
Registered: 2011-09-20
Posts: 2

Re: Hiding unused fields in forms

yllen wrote:

In 0.83, with ticket's template you will be able to hide fields

0.83 is now official released. I cannot find the ticket template function.

Offline

#5 2011-09-20 13:59:32

EmpereurZorg
Member
From: ORLEANS
Registered: 2005-12-31
Posts: 604

Re: Hiding unused fields in forms

Nop, it's 0.80.3, not 0.83.
You have to wait one month (at least  smile )


Version GLPI : 10.0.6 + Plug'in Glpi + Agent Fusion 2.4
Plateforme : Win Server 2019 , Apache 2.4, PHP 8.1

Offline

#6 2011-09-20 14:13:33

ksr0108
Member
From: Amsterdam
Registered: 2011-09-20
Posts: 2

Re: Hiding unused fields in forms

You're right EmpereurZorg. Stupid me  mad

Offline

Board footer

Powered by FluxBB