From: Galen Charlton <gmc@equinoxinitiative.org>
Date: Wed, 22 May 2019 18:57:52 +0000 (-0400)
Subject: LP#1776003: show codes throughout the Physical Characteristics Wizard
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=59136d13f11c5db351277c7b9932774d2df7d6ac;p=evergreen%2Fjoelewis.git

LP#1776003: show codes throughout the Physical Characteristics Wizard

This patch extends on the previous one to show the code (as well as the
label) in all drop-downs used in the Physical Characteristics Wizard. It
also makes the drop-down text accessible for translations, in case there
are any locales where "code: label" is not preferred.

This patch also adds release notes.

To test
-------
[1] Apply the patches and use the web staff MARC editor to edit or
    create an 007 field, then use the Physical Characteristics Wizard.
[2] Verify that the drop-downs now display both the code and the label
    for each value.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
---

diff --git a/Open-ILS/src/templates/staff/cat/share/t_physchar_wizard.tt2 b/Open-ILS/src/templates/staff/cat/share/t_physchar_wizard.tt2
index b94374cb5a..2f1c26ce37 100644
--- a/Open-ILS/src/templates/staff/cat/share/t_physchar_wizard.tt2
+++ b/Open-ILS/src/templates/staff/cat/share/t_physchar_wizard.tt2
@@ -10,14 +10,14 @@
       <div class="col-md-4">
         <div class="btn-group" uib-dropdown>
           <button type="button" class="btn btn-default" uib-dropdown-toggle>
-           <span style="padding-right: 5px;" ng-if="selected_option">{{selected_option.label()}}</span>
+           <span style="padding-right: 5px;" ng-if="selected_option">[% l('[_1]: [_2]', '{{selected_option.ptype_key()}}', '{{selected_option.label()}}') %]</span>
            <span style="padding-right: 5px;" ng-if="!selected_option">[% l('<unset>') | html %]</span>
            <span class="caret"></span>
          </button>
          <ul uib-dropdown-menu>
            <li ng-repeat="option in values_for_step">
              <a href ng-click="change_ptype(option)">
-              {{option.ptype_key()}}: {{option.label()}}
+              [% l('[_1]: [_2]', '{{option.ptype_key()}}', '{{option.label()}}') %]
              </a>
            </li>
          </ul>
@@ -29,14 +29,14 @@
       <div class="col-md-6">
         <div class="btn-group" uib-dropdown>
           <button type="button" class="btn btn-default" uib-dropdown-toggle>
-           <span style="padding-right: 5px;" ng-if="selected_option">{{selected_option.label()}}</span>
+           <span style="padding-right: 5px;" ng-if="selected_option">[% l('[_1]: [_2]', '{{selected_option.value()}}', '{{selected_option.label()}}') %]</span>
            <span style="padding-right: 5px;" ng-if="!selected_option">[% l('<unset>') | html %]</span>
            <span class="caret"></span>
          </button>
          <ul uib-dropdown-menu>
            <li ng-repeat="option in values_for_step">
              <a href ng-click="change_option(option)">
-              {{option.label()}}
+              [% l('[_1]: [_2]', '{{option.value()}}', '{{option.label()}}') %]
              </a>
            </li>
          </ul>
diff --git a/docs/RELEASE_NOTES_NEXT/Cataloging/Show_Codes_in_Physical_Characteristics_Wizard.adoc b/docs/RELEASE_NOTES_NEXT/Cataloging/Show_Codes_in_Physical_Characteristics_Wizard.adoc
new file mode 100644
index 0000000000..f15ced748b
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/Cataloging/Show_Codes_in_Physical_Characteristics_Wizard.adoc
@@ -0,0 +1,4 @@
+Display Codes in Physical Characteristics Wizard Drop-downs (LP#1776003)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Drop-downs in the Physical Characteristics Wizard in the MARC editor
+now display both code and label.