diff --git a/inc/container.class.php b/inc/container.class.php
index 092ed003..53ac907b 100644
--- a/inc/container.class.php
+++ b/inc/container.class.php
@@ -586,12 +586,22 @@ static function getTypeName($nb = 0) {
}
public function showForm($ID, $options = []) {
- global $CFG_GLPI;
-
- echo "
";
$this->initForm($ID, $options);
+
+ if (!$this->isNewID($ID)) {
+ $btn_url = Plugin::getWebDir('fields') . '/front/export_to_yaml.php?id=' . $ID;
+ $btn_label = __("Export to YAML", "fields");
+ $export_btn = <<
+
+
+ HTML;
+ $options['header_toolbar'] = [$export_btn];
+ }
+
$this->showFormHeader($options);
$rand = mt_rand();