From d80588aee5ef82e32038d20fae744a03e7d15944 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Sun, 29 Jan 2017 11:33:35 +0000 Subject: [PATCH] Bug 18002 - Added a new include (onboardinginclude.inc) which displays a form for the user to create a budget. Bug 18002 - Added in modal box and message (outside of modal box) for when users first visit Acquisitions. These messages are in place of the unclear yellow warning messages. Test plan: 1. Drop and recreate your database 2. Go through the web installer without installing any optional data values 3. Visit Acquisitions you should see two large yellow warning message boxes telling you to specify a currency and a budget 4. Apply this patch 5. Refresh the Acquisitions page. Instead of the two yellow warning messages you will see a message sentence telling you to create a currency (providing you with a link). As well as a modal box fading in specifying (with links) the steps you need to do to set up Acquisitions, in the following order: create budget, fund, vendor and basket Bug 18002 - Removed the Javascript preventing the display of currency and acquisition setup messages at the same time Bug 18002 - Removed errant warn and inline styling into an internal style sheet --- .../prog/en/includes/budgets-active-currency.inc | 8 ++--- .../prog/en/modules/acqui/acqui-home.tt | 38 +++++++++++++++++++++- 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc index 1862059..005d58e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc @@ -3,12 +3,12 @@

Currency = [% currency %]

[% END %] [% ELSE %] -
-

No active currency is defined

[% IF CAN_user_parameters_parameters_remaining_permissions %] -

Please specify an active currency.

+

You have no currencies defined in your database

+ Enter a currency [% ELSE %]

Your administrator must specify an active currency.

[% END %] -
+
+

Now you can follow the below steps to set up acquisitions.


[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt index f64a60b..8d1eceb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt @@ -4,6 +4,21 @@ Koha › Acquisitions [% INCLUDE 'doc-head-close.inc' %] + + [% INCLUDE 'datatables.inc' %] @@ -15,6 +30,13 @@ dt_overwrite_html_sorting_localeCompare(); $(document).ready(function() { + var modal = document.getElementById('acquisitionsModal'); + var span = document.getElementsByClassName("close")[0]; + + span.onclick = function() { + modal.style.display = "none"; + } + var oTable = $("#accounts").dataTable($.extend(true, {}, dataTablesDefaults, { "fnDrawCallback": function ( oSettings ) { if ( oSettings.aiDisplay.length == 0 ) @@ -103,11 +125,25 @@ $(document).ready(function() { [% INCLUDE 'budgets-active-currency.inc' hide = 'yes' %] [% UNLESS ( loop_budget ) %] [% IF ( CAN_user_acquisition_period_manage ) %] -
You must define a budget in Administration
+
+ ×

+ Follow these links to set everything up ready to create orders:

+

1. create a budget + -> + 2. assign a fund to that budget + -> + 3. create a vendor + -> + 4. create a basket +

+
[% ELSE %]
Your administrator must define a budget in Administration
[% END %] [% END %] +
-- 2.1.4