From af6871701637a057ba1e9bfe00498dc98ea5b207 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 17 Oct 2012 12:35:28 -0400 Subject: [PATCH] Bug 8935 - transport cost matrix could be prettier Correcting the template so that it follows established interface patterns and coding guidelines: - Form contents in a fieldset - Submit button in a fieldset with class "action" and with a "Cancel" link. - Errors displayed in a
(no custom error classes necessary). - Valid markup. - No JavaScript errors (to that end, the patch removes a call to a non-existent function, show_transport_cost_matrix) http://bugs.koha-community.org/show_bug.cgi?id=8936 Signed-off-by: Nicole C. Engard still works as expected and is much more visually appealing. Signed-off-by: Paul Poulain --- .../en/modules/admin/transport-cost-matrix.tt | 44 +++++++++---------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt index df1962c345..4ec0710570 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transport-cost-matrix.tt @@ -38,18 +38,11 @@ function form_submit (f) { $(f).find('input:disabled').removeAttr("disabled"); return true; } - -$(document).ready(function() { - show_transport_cost_matrix([% IF UseTransportCostMatrix %]true[% ELSE %]false[% END %]); -}); //]]> @@ -69,30 +62,34 @@ $(document).ready(function() { Defining transport costs between libraries [% IF ( WARNING_transport_cost_matrix_off ) %] -
Because the "UseTransportCostMatrix" system preference is currently not enabled, Transport Cost Matrix is not being used. Go here if you wish to enable this feature.
+
Because the "UseTransportCostMatrix" system preference is currently not enabled, the transport cost matrix is not being used. Go here if you wish to enable this feature.
[% END %] -
-
+ [% IF ( errors ) %]
+

There were problems with your submission

+
    + [% FOR e IN errors %] +
  • [% e %]
  • + [% END %] +
+
[% END %] + + -
+

Costs are decimal values between some arbitrary maximum value (e.g. 1 or 100) and 0 which is the minimum (no) cost.

Red cells signify no transfer allowed.

Click on individual cells to edit.

-
    - [% FOR e IN errors %] -
  • [% e %]
  • - [% END %] -
+ - [% FOR b IN branchloop %] + [% FOR b IN branchloop %] - [% END %] - + [% END %] + [% FOR bf IN branchfromloop %] @@ -118,12 +115,13 @@ $(document).ready(function() { [% END %]
From \ To[% b.name %]
[% bf.name %]
-
- + +
+ Cancel +
-
[% INCLUDE 'admin-menu.inc' %]
-- 2.39.5