From 6945c942d064ed03ad9d5f521b01dd9e9418b533 Mon Sep 17 00:00:00 2001 From: Aileen Nowak Date: Wed, 2 Aug 2017 14:30:47 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Improved=20theme=20validation=20?= =?UTF-8?q?messages=20(#812)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes TryGhost/Ghost#8530 - Changed the wording for activation and uploading a theme to separate between error and warnings in the title and the body text for the modal - Changed the wording of "Activated successful with warnings/errors" to "Activation successful with (warnings || errors)" --- ghost/admin/app/components/modals/theme-warnings.js | 1 + .../app/templates/components/modals/theme-warnings.hbs | 8 +++++++- .../app/templates/components/modals/upload-theme.hbs | 8 ++++---- ghost/admin/app/templates/settings/design.hbs | 4 +++- ghost/admin/tests/acceptance/settings/design-test.js | 4 ++-- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ghost/admin/app/components/modals/theme-warnings.js b/ghost/admin/app/components/modals/theme-warnings.js index 9876b6fd78..9ab6b60b67 100644 --- a/ghost/admin/app/components/modals/theme-warnings.js +++ b/ghost/admin/app/components/modals/theme-warnings.js @@ -7,6 +7,7 @@ export default ModalComponent.extend({ warnings: reads('model.warnings'), errors: reads('model.errors'), fatalErrors: reads('model.fatalErrors'), + canActivate: reads('model.canActivate'), 'data-test-theme-warnings-modal': true }); diff --git a/ghost/admin/app/templates/components/modals/theme-warnings.hbs b/ghost/admin/app/templates/components/modals/theme-warnings.hbs index 1a1c9b1ad3..7d0a41db68 100644 --- a/ghost/admin/app/templates/components/modals/theme-warnings.hbs +++ b/ghost/admin/app/templates/components/modals/theme-warnings.hbs @@ -1,5 +1,11 @@ {{inline-svg "close"}} diff --git a/ghost/admin/app/templates/components/modals/upload-theme.hbs b/ghost/admin/app/templates/components/modals/upload-theme.hbs index 34f566adad..4c93e0129e 100644 --- a/ghost/admin/app/templates/components/modals/upload-theme.hbs +++ b/ghost/admin/app/templates/components/modals/upload-theme.hbs @@ -2,11 +2,11 @@

{{#if theme}} {{#if hasWarningsOrErrors}} - Upload successful with warnings/errors! + Upload successful with {{#if validationErrors}}errors{{else}}warnings{{/if}} {{else}} Upload successful! {{/if}} - {{else if validationErrors}} + {{else if (or validationErrors fatalValidationErrors)}} Invalid theme {{else}} Upload a theme @@ -21,8 +21,8 @@