{#
 # ---------------------------------------------------------------------
 #
 # GLPI - Gestionnaire Libre de Parc Informatique
 #
 # http://glpi-project.org
 #
 # @copyright 2015-2025 Teclib' and contributors.
 # @licence   https://www.gnu.org/licenses/gpl-3.0.html
 #
 # ---------------------------------------------------------------------
 #
 # LICENSE
 #
 # This file is part of GLPI.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 #
 # ---------------------------------------------------------------------
 #}

{% extends "generic_show_form.html.twig" %}
{% import 'components/form/fields_macros.html.twig' as fields %}
{% set params = params ?? [] %}
{% set no_header = true %}
{% set no_inventory_footer = true %}

{% block more_fields %}
    <input type="hidden" name="itemtype" value="{{ item.fields['itemtype'] }}">
    <input type="hidden" name="items_id" value="{{ item.fields['items_id'] }}">

    {{ fields.dropdownField(
        'OperatingSystem',
        'operatingsystems_id',
        item.fields['operatingsystems_id'],
        __('Name'),
        field_options
    ) }}

    {{ fields.dropdownField(
        'OperatingSystemVersion',
        'operatingsystemversions_id',
        item.fields['operatingsystemversions_id'],
        _n('Version', 'Versions', 1),
        field_options
    ) }}

    {{ fields.dropdownField(
        'OperatingSystemArchitecture',
        'operatingsystemarchitectures_id',
        item.fields['operatingsystemarchitectures_id'],
        _n('Architecture', 'Architectures', 1),
        field_options
    ) }}

    {{ fields.dropdownField(
        'OperatingSystemServicePack',
        'operatingsystemservicepacks_id',
        item.fields['operatingsystemservicepacks_id'],
        "OperatingSystemServicePack"|itemtype_name,
        field_options
    ) }}

    {{ fields.dropdownField(
        'OperatingSystemKernelVersion',
        'operatingsystemkernelversions_id',
        item.fields['operatingsystemkernelversions_id'],
        _n('Kernel', 'Kernels', 1),
        field_options
    ) }}

    {{ fields.dropdownField(
        'OperatingSystemEdition',
        'operatingsystemeditions_id',
        item.fields['operatingsystemeditions_id'],
        _n('Edition', 'Editions', 1),
        field_options
    ) }}

    {{ fields.textField(
        'licenseid',
        item.fields['licenseid'],
        __('Product ID'),
        field_options
    ) }}

    {{ fields.textField(
        'license_number',
        item.fields['license_number'],
        __('Serial number'),
        field_options
    ) }}

    {{ fields.textField(
        'company',
        item.fields['company'],
        __('Company'),
        field_options
    ) }}

    {{ fields.textField(
        'owner',
        item.fields['owner'],
        __('Owner'),
        field_options
    ) }}

    {{ fields.htmlField(
        'install_date',
        item.fields['install_date']|formatted_datetime,
        __('Installation date')
    ) }}

    {{ fields.textField(
        'hostid',
        item.fields['hostid'],
        __('Host ID'),
        field_options
    ) }}
{% endblock %}
