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 2022-01-20 22:04:08

Kajtenator
Member
Registered: 2022-01-20
Posts: 1

Assets - mark field with color

Hello ,
I have searched the forum for a solution to distinguished the assets fields which I want to be mandatory ( te default  ones - not custom ) with no vail.
My installation ver 0,85.4
So I want to do is to color the desired fields only .I tried to edit the computer.class.php and the styles file .
But with no luck.
Is it possible at all?

Regards
Kajtenator

Offline

#2 2022-01-21 10:50:12

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,809
Website

Re: Assets - mark field with color

GLPI 0.85.4 is over 6 years old so I would suggest considering upgrading to a newer and supported version.

Newer versions have a red asterisk next to any mandatory/required fields and there is also a feature to add custom CSS without having to modify the styles that come with GLPI.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#3 2024-01-31 10:40:21

Juan2343
Member
Registered: 2024-01-31
Posts: 1

Re: Assets - mark field with color

Good morning,

Before writing this I tried to open a new post but it says "The following errors need to be corrected before message can be posted: You are not allowed to post links"


I just installed GLPI 10.0.11 and I would like to set some fields as required(mandatory) when we register an asset in computers.


I have tried(install) the Form Validation plugin, but from what I have seen it only allows mandatory fields to be created during the user session
and we cannotapply simultaneously to several users.

This is the message from the plugin: Edit mode (valid for current session only, will be reset at next login)


Not finding a way to create mandatory fields, I tried to modify the glpi_computers table of the DB (glpi) by executing the following commands:

ALTER TABLE glpi_computers MODIFY name VARCHAR(255) NOT NULL DEFAULT 'mandatory';

However, you could still add teams with the "name" field empty. Is there an option to create mandatory fields in computer assets?

Offline

#4 2024-02-04 16:28:47

Rafumel1774
Member
Registered: 2019-05-11
Posts: 131

Re: Assets - mark field with color

Besides pulling out an old post - which should be don't as circumstances changes.
You are messing with database integrity. I would not recommend and this can cause issues with upgrades in the future - IMHO you are on your own.

Offline

Board footer

Powered by FluxBB