From ef5b3506875787a1871a07e028558753cf40fcae Mon Sep 17 00:00:00 2001
From: Kevin Kaland <kevin@wizonesolutions.com>
Date: Thu, 26 Nov 2015 12:16:01 +0100
Subject: [PATCH] Issue #2359213: Add import/export links to form.

---
 src/Form/FillPdfFormForm.php | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/Form/FillPdfFormForm.php b/src/Form/FillPdfFormForm.php
index d2809ea..caa7692 100644
--- a/src/Form/FillPdfFormForm.php
+++ b/src/Form/FillPdfFormForm.php
@@ -187,7 +187,20 @@ class FillPdfFormForm extends ContentEntityForm {
 
     $form['fillpdf_fields']['#weight'] = 100;
 
-    // @todo: Add import/export links once those routes actually exist
+    $form['export_fields'] = [
+      '#prefix' => '<div>',
+      '#markup' => $this->l($this->t('Export these field mappings'), Url::fromRoute('entity.fillpdf_form.export_form', ['fillpdf_form' => $entity->id()])),
+      '#suffix' => '</div>',
+      '#weight' => 100,
+    ];
+
+    $form['import_fields'] = [
+      '#prefix' => '<div>',
+      '#markup' => $this->l($this->t('Import a previous export into this PDF'), Url::fromRoute('entity.fillpdf_form.import_form', ['fillpdf_form' => $entity->id()])),
+      '#suffix' => '</div>',
+      '#weight' => 100,
+    ];
+
     return $form;
   }
 
-- 
GitLab