You are not logged in.
Hi,
I installed the Room plugin to 9.2, but if I would add a new room, add button isn't in bottom of form. The room management must have for me.
How upgrade the plugin, or upgrade GLPI to 9.1.6?
Thanks!
Last edited by machobymb (2017-11-26 23:05:46)
Offline
I viewed the source (room.class.php). The form rendering is incorrect, because in debug mode wrote this error message:
"Fatal error: Call to undefined method Dropdown::showInteger() in /var/www/html/glpi/plugins/room/inc/room.class.php on line 315"
This line is in source:
Dropdown::showInteger("size", $this->fields["size"],0, 500);
What is the problem in this line?
Last edited by machobymb (2017-11-17 01:37:29)
Offline
Heureka!
I found this information in GitHub: the showInteger function is deprecated.
I changed the line 315 in room.class.php:
if (version_compare(GLPI_VERSION, '9.2', '<')) {
Dropdown::showInteger("size", $this->fields["size"],0, 500);
} else {
Dropdown::showNumber("size", array('value' => $this->fields["size"], 'min' => 0, 'max' => 500));
}
This code was perfect!
I thought that showDateFormItem is deprecated too in line 331.
I changed the line 331 (now 335) in room.class.php:
if (version_compare(GLPI_VERSION, '9.2', '<')) {
Dropdown::showDateFormItem("buy", $this->fields["buy"],true, true);
} else {
Dropdown::showDateField("buy", array('value' => $this->fields["buy"], 'maybeempty' => true, 'canedit' => true, 'min' => '', 'max' => ''));
}
The form is good now.
Where can I found full documentation from GLPI functions. I'd like develop a specific event calendar plugin to my workplace.
Offline
Please note that plugin Room is being updated for GLPI v9.2, see https://github.com/pluginsGLPI/room/issues/27
Offline