From 1e3ed714707878caa603ffdc262e64abb6ddfb5c Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 21 Jan 2016 10:59:21 +0100 Subject: [PATCH] Add warning message for PocketImport Warn user if pocket_consumer_key isn't defined --- src/Wallabag/ImportBundle/Controller/PocketController.php | 1 + .../ImportBundle/Resources/views/Pocket/index.html.twig | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/Wallabag/ImportBundle/Controller/PocketController.php b/src/Wallabag/ImportBundle/Controller/PocketController.php index 7aee302f..1c1b4fa8 100644 --- a/src/Wallabag/ImportBundle/Controller/PocketController.php +++ b/src/Wallabag/ImportBundle/Controller/PocketController.php @@ -15,6 +15,7 @@ class PocketController extends Controller { return $this->render('WallabagImportBundle:Pocket:index.html.twig', [ 'import' => $this->get('wallabag_import.pocket.import'), + 'has_consumer_key' => '' == trim($this->get('craue_config')->get('pocket_consumer_key')) ? false : true, ]); } diff --git a/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig index 643ad775..e0e36f38 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig @@ -5,6 +5,12 @@
+ {% if not has_consumer_key %} +
+ {% trans %}Pocket import isn't configured. You need to define pocket_consumer_key.{% endtrans %} +
+ {% endif %} +
{{ import.description|trans }}

{% trans %}You can import your data from your Pocket account. You just have to click on the below button and authorize the application to connect to getpocket.com.{% endtrans %}

-- 2.41.0