From e624faaacb42e1a993edfff929c941574f733265 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Fri, 21 Dec 2018 14:31:04 +0000 Subject: [PATCH] Add 'please wait' message to bulk invoice modal --- .../templates/admin/modals/bulk_invoice.html.haml | 5 ++--- app/assets/stylesheets/admin/orders.css.scss | 4 ++++ config/locales/en.yml | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/templates/admin/modals/bulk_invoice.html.haml b/app/assets/javascripts/templates/admin/modals/bulk_invoice.html.haml index 5e39dbab23..16ddb39508 100644 --- a/app/assets/javascripts/templates/admin/modals/bulk_invoice.html.haml +++ b/app/assets/javascripts/templates/admin/modals/bulk_invoice.html.haml @@ -1,6 +1,3 @@ -%a.close-reveal-modal{ ng: { click: '$close()' } } - %i.fa.fa-times-circle - %h4.modal-title = t('js.admin.orders.index.compiling_invoices') @@ -10,6 +7,8 @@ {{error}} %img.spinner{ src: "/assets/spinning-circles.svg", ng: { show: "loading" } } +%p{ ng: { show: "loading" } } + = t('js.admin.orders.index.please_wait') %a.button{ target: '_blank', ng: { click: 'showBulkInvoice()', href: '/admin/orders/invoices/{{invoice_id}}', show: "!loading && !error" } } = t('js.admin.orders.index.view_file') diff --git a/app/assets/stylesheets/admin/orders.css.scss b/app/assets/stylesheets/admin/orders.css.scss index 6355a4499c..4858c0685a 100644 --- a/app/assets/stylesheets/admin/orders.css.scss +++ b/app/assets/stylesheets/admin/orders.css.scss @@ -126,6 +126,10 @@ table.index td.actions { margin-bottom: 1em; } + .spinner { + margin-bottom: 1em; + } + .error { color: $warning-red; } diff --git a/config/locales/en.yml b/config/locales/en.yml index 12699b347c..932fb97207 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2594,6 +2594,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using compiling_invoices: Compiling Invoices bulk_invoice_created: Bulk Invoice created bulk_invoice_failed: Failed to create Bulk Invoice + please_wait: Please wait until the PDF is ready before closing this modal. resend_user_email_confirmation: resend: "Resend" sending: "Resend..."