From 52f14b70d45651ff5a4a6777c16be09e463ee7d8 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 Content-Type: text/plain; charset="utf-8" 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 --- .../prog/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 8d12419..42d6323 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 0 to some arbitrarymax value (1 or 100), 0 being minimum (no) cost.

Red cells signify no transfer allowed

Click on the cell 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' %]
-- 1.7.9.5