From ece5307e588e3bf9ce48e8348b94f890138da4a8 Mon Sep 17 00:00:00 2001 From: Owen Leonard <oleonard@myacpl.org> Date: Mon, 10 Jun 2013 09:36:40 -0400 Subject: [PATCH] [PASSED QA] Bug 10442 - Remove references to non-standard "error" class The CSS for <div class="error"> is obsolete and should not be used. This patch removes the definition from the main CSS file and corrects instances of its use in the templates to the standard <div class="dialog alert">. This patch also corrects some minor HTML validity and capitalization errors in the changed templates. Testing each error condition in all the modified temlates is probably overkill for the minor changes made in this patch. Markup has simply been changed to use alternate existing styles. Visual confirmation of the markup changes is probably sufficient. Signed-off-by: Liz Rea <wizzyrea@gmail.com> confirmed the changes - no obvious errors, functionality seems fine. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests and QA script. I read the changes and did a few tests in Koha. Some of the error conditions are pretty hard to reproduce, I did manage for lateorders, but didn't succeed for memberentrygen and parcel. But changes appear to be save and I spotted no problems, so passing QA. Patch also fixes a few capitalization errors. --- .../intranet-tmpl/prog/en/css/staff-global.css | 7 ------- .../prog/en/modules/acqui/lateorders.tt | 13 ++++++------- .../prog/en/modules/acqui/neworderempty.tt | 2 -- .../prog/en/modules/acqui/orderreceive.tt | 1 - .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 2 +- .../prog/en/modules/admin/aqbudgets.tt | 2 +- .../en/modules/admin/searchengine/solr/indexes.tt | 2 +- .../prog/en/modules/installer/step2.tt | 2 +- .../prog/en/modules/members/memberentrygen.tt | 4 ++-- .../prog/en/modules/plugins/plugins-home.tt | 10 +++++----- .../prog/en/modules/tools/batchMod-edit.tt | 2 +- 11 files changed, 18 insertions(+), 29 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index f5d5bc2..514fa3f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -877,13 +877,6 @@ fieldset.rows .inputnote { color: #cc0000; } -div.error { - border : 2px dashed #990000; - background-color : #FFFF99; - padding : .5em; - margin : 1em; -} - input.alert { background-color : #FFFF99; border-color: #900; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt index c825d06..0724bc6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt @@ -53,9 +53,9 @@ $(document).ready(function() { [% IF error_claim %] [% IF ( error_claim == "no_email" ) %] - <div class="error">This vendor has no email</div> + <div class="dialog alert">This vendor has no email</div> [% ELSE %] - <div class="error">[% error_claim %]</div> + <div class="dialog alert">[% error_claim %]</div> [% END %] [% END %] [% IF info_claim %] @@ -138,7 +138,6 @@ $(document).ready(function() { <input type="checkbox" class="checkbox" name="claim_for" value="[% lateorder.ordernumber %]" booksellerid="[% lateorder.supplierid %]"/> [% END %] </td> - </td> </tr> [% END %] </tbody> @@ -153,7 +152,7 @@ $(document).ready(function() { <th> </th> <th> </th> <td> - <input type="submit" value="Claim Order" /> + <input type="submit" value="Claim order" /> </td> </tr> </tfoot> @@ -167,7 +166,7 @@ $(document).ready(function() { <div class="yui-b"> <form action="lateorders.pl" method="get"> <fieldset class="brief"> -<h4>Filter Results:</h4> +<h4>Filter results:</h4> [% FOREACH ERROR_LOO IN ERROR_LOOP %] [% IF ( ERROR_LOO.delay_digits ) %]<p class="error">The number of days ([% ERROR_LOO.bad_delay %]) must be a number between 0 and 999.</p>[% END %] [% END %] @@ -183,8 +182,8 @@ $(document).ready(function() { </li> <li><label for="booksellerid">Vendor:</label> - <select id="booksellerid" size="1" tabindex="" name="booksellerid"> - <option value=""/> + <select id="booksellerid" size="1" name="booksellerid"> + <option value=""></option> [% FOREACH SUPPLIER_LOO IN SUPPLIER_LOOP %] [% IF ( SUPPLIER_LOO.selected ) %]<option value="[% SUPPLIER_LOO.id %]" selected="selected">[% SUPPLIER_LOO.name %]</option> [% ELSE %]<option value="[% SUPPLIER_LOO.id %]">[% SUPPLIER_LOO.name %]</option>[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index 87cfa8a..babfc13 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -171,8 +171,6 @@ $(document).ready(function() [% END %] </h2> -<div class="error" style="display:none"></div> - [% IF ( basketno ) %] <div id="acqui_basket_summary" class="yui-g"> <fieldset class="rows"> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt index a65236d..3557ed4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -142,7 +142,6 @@ <form action="/cgi-bin/koha/acqui/finishreceive.pl" method="post" onsubmit="return Check(this);"> <div class="yui-g"> <div class="yui-u first"> - <div class="error" style="display:none"></div> <fieldset class="rows"> <legend>Catalog details</legend> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index 415c7e8..205e6c5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -144,7 +144,7 @@ [% END %] [% IF (error_cancelling_receipt) %] - <div class="error"> + <div class="dialog alert"> Cannot cancel receipt. Possible reasons : <ul> <li> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt index 7df04f3..07a80fe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt @@ -219,7 +219,7 @@ [% UNLESS ( delete_confirm ) %][% INCLUDE 'budgets-admin-toolbar.inc' %][% END %] [% IF (error_not_authorised_to_modify) %] - <div class="error"> + <div class="dialog alert"> <p>You are not authorized to modify this fund</p> </div> [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/solr/indexes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/solr/indexes.tt index b72a1ea..6212c32 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/solr/indexes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/solr/indexes.tt @@ -76,7 +76,7 @@ Warning: Any modification in these configurations will need a total reindexation to be fully taken into account ! </div> [% IF ( errors ) %] - <div class="error"> + <div class="dialog alert"> Errors occurred, Modifications does not apply. Please check following values: <ul> [% FOREACH e IN errors %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt index 4a02f18..0bded39 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt @@ -28,7 +28,7 @@ <p class="tip">Please create the database before continuing.</p> [% END %] [% ELSE %] - <div class="error">[% error %] : [% message %] + <div class="dialog alert">[% error %] : [% message %] </div> <div class="tip"> <ul> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index 1bb8e3e..ebbd4d8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -105,9 +105,9 @@ [% IF error_alert %] [% IF ( error_alert == "no_email" ) %] - <div class="error">This member has no email</div> + <div class="dialog alert">This patron has no email</div> [% ELSE %] - <div class="error">[% error_alert %]</div> + <div class="dialog alert">[% error_alert %]</div> [% END %] [% END %] [% IF info_alert %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt index 7f9a581..5cabe67 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt @@ -53,13 +53,13 @@ <td> [% IF ( CAN_user_plugins_report ) %] [% IF plugin.can('report') %] - <p style="white-space:nowrap"><a href="/cgi-bin/koha/plugins/run.pl?class=[% plugin.class %]&method=report">Run report</a></p> + <p style="white-space:nowrap"><a href="/cgi-bin/koha/plugins/run.pl?class=[% plugin.class %]&method=report">Run report</a></p> [% END %] [% END %] [% IF ( CAN_user_plugins_tool ) %] [% IF plugin.can('tool') %] - <p style="white-space:nowrap"><a href="/cgi-bin/koha/plugins/run.pl?class=[% plugin.class %]&method=tool">Run tool</a></p> + <p style="white-space:nowrap"><a href="/cgi-bin/koha/plugins/run.pl?class=[% plugin.class %]&method=tool">Run tool</a></p> [% END %] [% END %] </td> @@ -67,11 +67,11 @@ [% plugin.metadata.description %] [% IF ( plugin.metadata.minimum_version && koha_version < plugin.metadata.minimum_version ) %] - <div class="error">Warning: This report was written for a newer version of Koha. Run at your own risk.</div> + <span class="problem">Warning: This report was written for a newer version of Koha. Run at your own risk.</span> [% END %] [% IF ( plugin.metadata.maximum_version && koha_version > plugin.metadata.maximum_version ) %] - <div class="error">Warning: This report was written for an older version of Koha. Run at your own risk.</div> + <span class="problem">Warning: This report was written for an older version of Koha. Run at your own risk.</span> [% END %] </td> <td>[% plugin.metadata.author %]</td> @@ -82,7 +82,7 @@ [% IF ( CAN_user_plugins_configure ) %] <td> [% IF plugin.can('configure') %] - <a href="/cgi-bin/koha/plugins/run.pl?class=[% plugin.class %]&method=configure">Configure</a> + <a href="/cgi-bin/koha/plugins/run.pl?class=[% plugin.class %]&method=configure">Configure</a> [% END %] </td> [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt index de67517..15de7b2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt @@ -116,7 +116,7 @@ $(document).ready(function(){ </tr> </thead> <tbody> - [% FOREACH item_loo IN item_loop %] <tr> [% IF ( show ) %][% IF ( item_loo.nomod ) %] <td class="error">Cannot Edit</td>[% ELSE %]<td><input type="checkbox" name="itemnumber" value="[% item_loo.itemnumber %]" id="row[% item_loo.itemnumber %]" checked="checked" /></td>[% END %][% ELSE %]<td> </td>[% END %] + [% FOREACH item_loo IN item_loop %] <tr> [% IF ( show ) %][% IF ( item_loo.nomod ) %] <td class="error">Cannot edit</td>[% ELSE %]<td><input type="checkbox" name="itemnumber" value="[% item_loo.itemnumber %]" id="row[% item_loo.itemnumber %]" checked="checked" /></td>[% END %][% ELSE %]<td> </td>[% END %] <td><label for="row[% item_loo.itemnumber %]"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item_loo.biblionumber %]">[% item_loo.title %]</a>[% IF ( item_loo.author ) %], by [% item_loo.author %][% END %]</label></td> [% FOREACH item_valu IN item_loo.item_value %] <td>[% item_valu.field |html %]</td> [% END %] </tr> -- 1.7.9.5