Skip to content

Commit

Permalink
refactor: compatibility with GLPI 9.5
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Apr 28, 2020
1 parent d08cc0b commit 66973d6
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions inc/fields/timefield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,21 @@ public function getDesignSpecializationField() {
$additions .= '</td>';
$additions .= '<td>';
$value = Html::entities_deep($this->question->fields['default_values']);
$additions .= Html::showTimeField('default_values', [
'type' => 'text',
'id' => 'default_values',
'value' => $value,
'display' => false,
]);
if (version_compare(GLPI_VERSION, '9.5') >= 0) {
$additions .= Html::showTimeField('default_values', [
'type' => 'text',
'id' => 'default_values',
'value' => $value,
'display' => false,
]);
} else {
$additions .= static::showTimeField('default_values', [
'type' => 'text',
'id' => 'default_values',
'value' => $value,
'display' => false,
]);
}
$additions .= '</td>';
$additions .= '<td></td>';
$additions .= '<td></td>';
Expand Down

0 comments on commit 66973d6

Please sign in to comment.