Bug 19889: (QA follow-up) use em over i and update field if unset
authorNick Clemens <nick@bywatersolutions.com>
Wed, 19 Aug 2020 12:21:27 +0000 (12:21 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 31 Aug 2020 14:17:58 +0000 (16:17 +0200)
em is better for accessibility

We should set the field to 0 when it was previously unset

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt
tools/batchMod.pl

index ea1a2d5..5cde513 100644 (file)
 
     [% IF updated_exclude_from_local_holds_priority.defined %]
     <div class="dialog message">
-        <i>Exclude from local holds priority</i> updated to
+        <em>Exclude from local holds priority</em> updated to
         [% IF updated_exclude_from_local_holds_priority %]
-            <i>Yes</i>
+            <em>Yes</em>
         [% ELSE %]
-            <i>No</i>
+            <em>No</em>
         [% END %]
     </div>
     [% END %]
index 127cead..bcf509d 100755 (executable)
@@ -242,7 +242,7 @@ if ($op eq "action") {
                         else {
                             my $modified_holds_priority = 0;
                             if (defined $exclude_from_local_holds_priority) {
-                                if($item->exclude_from_local_holds_priority != $exclude_from_local_holds_priority) {
+                                if(!defined $item->exclude_from_local_holds_priority || $item->exclude_from_local_holds_priority != $exclude_from_local_holds_priority) {
                                 $item->exclude_from_local_holds_priority($exclude_from_local_holds_priority)->store;
                                 $modified_holds_priority = 1;
                             }