{#
 # ---------------------------------------------------------------------
 #
 # 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.htmlField(
      'items_id',
      asset_item.getLink(),
      __('Item link'),
      field_options|merge(params)
   ) }}

   {{ fields.textField(
      'device',
      item.fields['device'],
      __('Partition'),
      field_options|merge(params)
   ) }}

   {{ fields.textField(
      'mountpoint',
      item.fields['mountpoint'],
      __('Mount Point'),
      field_options|merge(params)
   ) }}

   {% set filesystems_label = call('Filesystem::getTypeName', [0]) %}
   {{ fields.dropdownField(
      'Filesystem',
      'filesystems_id',
      item.fields['filesystems_id'],
      filesystems_label,
      field_options|merge(params)
   ) }}

   {{ fields.textField(
      'totalsize',
      item.fields['totalsize'],
      __('Global size'),
      field_options|merge(params)
   ) }}

   {{ fields.textField(
      'freesize',
      item.fields['freesize'],
      __('Free size'),
      field_options|merge(params)
   ) }}

   {{ fields.dropdownArrayField(
      'encryption_status',
      item.fields['encryption_status'],
      encryption_status_list,
      __('Encryption tool'),
      field_options|merge(params)
   ) }}

   {{ fields.textField(
      'encryption_tool',
      item.fields['encryption_tool'],
      __('Encryption Tool'),
      field_options|merge(params)
   ) }}

   {{ fields.textField(
      'encryption_algorithm',
      item.fields['encryption_algorithm'],
      __('Encryption Algorithm'),
      field_options|merge(params)
   ) }}

   {{ fields.textField(
      'encryption_type',
      item.fields['encryption_type'],
      __('Encryption Type'),
      field_options|merge(params)
   ) }}

{% endblock %}
