From f0270a17a9c9067cea9253c74404e59b072f56dc Mon Sep 17 00:00:00 2001 From: Awilum Date: Thu, 6 Feb 2020 15:34:19 +0300 Subject: [PATCH] feat(admin-plugin): show Confirmation Required modal for system plugins deactivation #211 --- site/plugins/admin/lang/en_US.yaml | 1 + .../templates/extends/plugins/index.html | 38 +++++++++++++++---- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/site/plugins/admin/lang/en_US.yaml b/site/plugins/admin/lang/en_US.yaml index c21307b6..829e6575 100755 --- a/site/plugins/admin/lang/en_US.yaml +++ b/site/plugins/admin/lang/en_US.yaml @@ -339,6 +339,7 @@ admin_cofirmation_required_for_fieldset_delete: "Are you sure you want to delete admin_cofirmation_required_for_snippet_delete: "Are you sure you want to delete this snippet?" admin_cofirmation_required_for_template_delete: "Are you sure you want to delete this template?" admin_author: "Author" +admin_cofirmation_required_for_deactivate_system_plugin: "Are you sure you want to deactivate system plugin?" admin_message_delivery_api_token_updated: "Delivery token updated." admin_message_delivery_api_token_was_not_updated: "Delivery token was not updated." admin_message_delivery_api_token_created: "Delivery token created." diff --git a/site/plugins/admin/templates/extends/plugins/index.html b/site/plugins/admin/templates/extends/plugins/index.html index de06c679..8ccad27d 100644 --- a/site/plugins/admin/templates/extends/plugins/index.html +++ b/site/plugins/admin/templates/extends/plugins/index.html @@ -51,15 +51,24 @@ {{ icon('fas fa-cog') }} {{ tr('admin_settings') }} - - {% if plugin.enabled %} - {{ icon('fas fa-toggle-on') }} - {{ tr('admin_deactivate') }} + {% if plugin.enabled %} + {% if key == 'admin' or key == 'site' %} + + {{ icon('fas fa-toggle-on') }} + {{ tr('admin_deactivate') }} + {% else %} + + {{ icon('fas fa-toggle-on') }} + {{ tr('admin_deactivate') }} + + {% endif %} + {% else %} + {{ icon('fas fa-toggle-off') }} {{ tr('admin_activate') }} - {% endif %} - + + {% endif %}