Koha/koha-tmpl/intranet-tmpl/prog/en/includes
Jonathan Druart b64e6be1c4 Bug 16157: Move the selected flag from GetAuthorisedValues to the templates
From C4::Koha::GetAuthorisedValues

    # TODO: the "selected" feature should be replaced by a utility function
    # somewhere else, it doesn't belong in here. For starters it makes
    # caching much more complicated. Or just let the UI logic handle it, it's
    # what it's for.

Indeed, it's not a job for a subroutine, the template should take care of that.
Note that a perf gain could be won with this patch \o/

Test plan:
- Edit an itemtype and check the value of the "Search category" dropdown list
- Edit a patron attribute type and check the value of the "Class" dropdown list
- Detail for a catalogue record, the Status column should be correctly
  populated if items are damaged and/or lost
- Item details for a catalogue record, the lost, damaged and withdrawn
  value should be correctly displayed
- Edit a patron, the "street type" should be correctly selected
- Create a patron attribute type linked to an authorised value list.
- Edit a patron, set a value for this attribute, edit it again. The
  correct value should be selected.
- Search for subscriptions. The 'Location' dropdown list should behave
  correctly (select the entry you have choosen before, etc.)
- Edit a subscription, the location dropdown list should select the
  correct value.
- Edit and view a suggestion with a 'reason for suggestion' set (you
  should have at least 1 OPAC_SUG AV defined)

Followed test plan, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-04-07 00:16:09 +00:00
..
catalogue Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues 2016-02-11 19:39:53 +00:00
csv_headers Bug 14636: Item search - improving display 2015-12-30 12:44:26 +00:00
virtualshelves/merge
acquisitions-add-to-basket.inc Bug 11665: An ability to place orders directly from hold ratios list 2014-05-04 19:13:39 +00:00
acquisitions-menu.inc Bug 7736: Support Ordering via Edifact EDI messages 2016-04-01 20:03:17 +00:00
acquisitions-search.inc Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues 2016-02-11 19:39:53 +00:00
acquisitions-toolbar.inc Bug 14915: Use Font Awesome instead of Glyphicons for the staff intranet 2015-10-27 10:02:42 -03:00
additem.js.inc Bug 10576: make strings in additem.js accessible to translation 2013-07-22 15:40:21 +00:00
admin-items-search-field-form.inc Bug 15887: Revise layout and behavior of item search fields management 2016-03-02 22:36:17 +00:00
admin-menu.inc Bug 7736: Support Ordering via Edifact EDI messages 2016-04-01 20:03:17 +00:00
auth-finder-search.inc Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues 2016-02-11 19:39:53 +00:00
authorities-search-results.inc Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues 2016-02-11 19:39:53 +00:00
authorities-search.inc Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues 2016-02-11 19:39:53 +00:00
authorities-toolbar.inc Bug 15381: Remove getauthtypes and getauthtype 2015-12-31 18:59:02 +00:00
authorities.inc Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues 2016-02-11 19:39:53 +00:00
authorities_js.inc Bug 12295: fix Javascript error when merging authorities 2014-06-05 12:16:39 -03:00
av-build-dropbox.inc Bug 16157: Move the selected flag from GetAuthorisedValues to the templates 2016-04-07 00:16:09 +00:00
biblio-default-view.inc
biblio-view-menu.inc Bug 14557: Add holds count to holds tab 2015-08-26 10:56:02 -03:00
borrower_debarments.inc Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues 2016-02-11 19:39:53 +00:00
branch-selector.inc Bug 13040 [QA Followup] - Fix koha-qa.pl issues 2015-01-26 16:22:12 -03:00
browser-strings.inc Bug 10404: add previous/next browsing to staff client 2013-08-09 15:07:39 +00:00
budgets-active-currency.inc Bug 15049: (followup) Add warning about "No active currency" 2015-12-30 23:34:34 +00:00
budgets-admin-search.inc Bug 15706: Changing to circulate_remaining_permissions 2016-02-23 22:38:46 +00:00
budgets-admin-toolbar.inc Bug 14915: Use Font Awesome instead of Glyphicons for the staff intranet 2015-10-27 10:02:42 -03:00
calendar.inc Bug 12072: Make datepicker and templates to be aware of dmydot format 2015-11-19 13:15:19 -03:00
cat-menu.inc
cat-search.inc Bug 15706: Changing to circulate_remaining_permissions 2016-02-23 22:38:46 +00:00
cat-toolbar.inc Bug 13642 - Adding new features for Dublin Core metadata 2016-01-27 06:23:07 +00:00
cataloging-search.inc Bug 15706: Changing to circulate_remaining_permissions 2016-02-23 22:38:46 +00:00
cateditor-ui.inc Bug 15344: Remove unucessary call to GetMemberDetails 2015-12-30 11:53:18 +00:00
cateditor-widgets-marc21.inc Bug 11559: (followup) Fix import bugs, display/parsing issues 2015-10-27 12:18:00 -03:00
checkin-search.inc Bug 15706: Changing to circulate_remaining_permissions 2016-02-23 22:38:46 +00:00
checkouts-table-footer.inc Bug 14948 - Display amounts right aligned in tables on patron pages 2015-12-30 04:25:51 +00:00
checkouts-table.inc Bug 12920 [QA Followup] - Show override option below checkouts table when allowed 2016-02-24 03:10:20 +00:00
circ-menu.inc Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues 2016-02-11 19:39:53 +00:00
circ-search.inc Bug 15706: Changing to circulate_remaining_permissions 2016-02-23 22:38:46 +00:00
cities-admin-search.inc Bug 15706: Changing to circulate_remaining_permissions 2016-02-23 22:38:46 +00:00
columns_settings.inc Bug 15921: Do not include datatables js/css files twice 2016-03-24 15:50:02 +00:00
contracts-admin-search.inc Bug 15706: Changing to circulate_remaining_permissions 2016-02-23 22:38:46 +00:00
currencies-admin-search.inc Bug 15706: Changing to circulate_remaining_permissions 2016-02-23 22:38:46 +00:00
datatables-strings.inc Bug 11555: Make "All" one of the default options for datatables 2014-03-10 18:49:33 +00:00
datatables.inc Bug 15921: Do not include datatables js/css files twice 2016-03-24 15:50:02 +00:00
date-format.inc Bug 12072: Make datepicker and templates to be aware of dmydot format 2015-11-19 13:15:19 -03:00
doc-head-close-receipt.inc Bug 10592: fix display of favicon 2013-07-22 14:00:23 +00:00
doc-head-close.inc Bug 15111: Do not include the antiClickjack legacy browser trick for greybox 2016-03-14 16:30:09 +00:00
doc-head-open.inc Bug 13948: Prevent explosion when Template::Plugin::Stash not installed 2015-07-28 10:30:21 -03:00
empty_line.inc Bug 14263: Fix export of item search results when translated 2015-06-04 10:08:40 -03:00
facets.inc Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues 2016-02-11 19:39:53 +00:00
form-blocks.inc Bug 8332 follow-up: make strings translatable 2012-09-03 12:46:55 +02:00
format_price.inc Bug 12987: Update table footer with the visible rows 2014-11-11 09:46:21 -03:00
greybox.inc Revert "Bug 8992: Use the existing greybox plugin in interface/theme" 2015-04-29 12:07:23 -03:00
guided-reports-view.inc
header.inc Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues 2016-02-11 19:39:53 +00:00
help-bottom.inc Bug 12700 - Capitalization: "Close Help Window" in context help 2014-08-11 11:40:24 -03:00
help-top.inc Bug 13941: [2/2] Fix <body> tags missing id/class 2015-04-24 09:47:38 -03:00
home-search.inc Bug 15706: Changing to circulate_remaining_permissions 2016-02-23 22:38:46 +00:00
installer-doc-head-close.inc Bug 13941: [2/2] Fix <body> tags missing id/class 2015-04-24 09:47:38 -03:00
intranet-bottom.inc Bug 11431: Add additional sound options 2015-11-04 12:32:57 -03:00
intranetstylesheet.inc Bug 10052 Followup for edithelp.tt and help-top.inc 2013-05-23 08:55:11 -07:00
labels-toolbar.inc Bug 14915: (QA followup) Switch recent commits from Glyphicons to Font Awesome 2015-10-27 10:04:53 -03:00
letters-search.inc Bug 15706: Changing to circulate_remaining_permissions 2016-02-23 22:38:46 +00:00
member-alt-address-style-de.inc Bug 15373: Changing Zip to ZIP on OPAC and Intranet 2015-12-30 16:30:35 +00:00
member-alt-address-style-us.inc Bug 15373: Changing Zip to ZIP on OPAC and Intranet 2015-12-30 16:30:35 +00:00
member-alt-contact-style-de.inc Bug 15373: Changing Zip to ZIP on OPAC and Intranet 2015-12-30 16:30:35 +00:00
member-alt-contact-style-us.inc Bug 15373: Changing Zip to ZIP on OPAC and Intranet 2015-12-30 16:30:35 +00:00
member-display-address-style-de.inc Bug 15542: Change for the German style address format 2016-01-23 19:15:08 +00:00
member-display-address-style-us.inc Bug 15542: Always display the patron's info the same way. 2016-01-23 19:15:08 +00:00
member-main-address-style-de.inc Bug 16157: Move the selected flag from GetAuthorisedValues to the templates 2016-04-07 00:16:09 +00:00
member-main-address-style-us.inc Bug 16157: Move the selected flag from GetAuthorisedValues to the templates 2016-04-07 00:16:09 +00:00
members-menu.inc Bug 14157: Notices tab in the patron record should not depend on EnhancedMessagingPreferences to display 2015-11-05 10:29:15 -03:00
members-toolbar.inc Bug 15096: Export today's checked in barcodes: Display warning if reading history is set to "never" 2016-01-27 06:02:43 +00:00
merge-record-strings.inc Bug 8064: Change the way target record is built. 2015-11-09 15:08:57 -03:00
merge-record.inc Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues 2016-02-11 19:39:53 +00:00
messaging-preference-form.inc Bug 14836: Use Koha::PatronCategor[y|ies] in admin/categories.pl 2015-11-05 10:57:40 -03:00
nl-search-form.tt Bug 11401: Add support for Norwegian national library card 2014-11-14 09:42:23 -03:00
page-numbers.inc Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues 2016-02-11 19:39:53 +00:00
patron-search-box.inc Bug 15706: (follow-up) Changing to circulate_remaining_permissions 2016-02-23 22:38:46 +00:00
patron-search.inc Bug 15706: Changing to circulate_remaining_permissions 2016-02-23 22:38:46 +00:00
patron-title.inc Bug 12648: Fix conflict with bug 8096 2015-03-11 14:16:17 -03:00
patron-toolbar.inc Bug 14915: Use Font Awesome instead of Glyphicons for the staff intranet 2015-10-27 10:02:42 -03:00
patroncards-errors.inc Bug 9924: (follow-up) ensure that correct error message is displayed 2013-09-08 19:19:50 +00:00
patroncards-toolbar.inc Bug 14915: (QA followup) Switch recent commits from Glyphicons to Font Awesome 2015-10-27 10:04:53 -03:00
patrons-admin-search.inc Bug 15706: Changing to circulate_remaining_permissions 2016-02-23 22:38:46 +00:00
permissions.inc Bug 15289 [QA Followup] - Fix minor language issue 2015-12-30 02:51:50 +00:00
popup-bottom.inc
prefs-admin-search.inc Bug 15706: Changing to circulate_remaining_permissions 2016-02-23 22:38:46 +00:00
prefs-menu.inc Bug 11559: Rancor: advanced cataloging interface 2015-10-27 12:17:39 -03:00
printers-admin-search.inc Bug 15706: Changing to circulate_remaining_permissions 2016-02-23 22:38:46 +00:00
quotes-toolbar.inc Bug 14915: Use Font Awesome instead of Glyphicons for the staff intranet 2015-10-27 10:02:42 -03:00
quotes-upload-toolbar.inc Bug 14915: (QA followup) Replace fa-hdd with fa-save 2015-10-27 10:03:24 -03:00
reports-menu.inc
reports-toolbar.inc Bug 13132: Add confirm dialog for deleting reports from the reports toolbar 2016-03-31 18:50:54 +00:00
resort_form.inc
rotating-collections-toolbar.inc Bug 15866: Add confirm message for deleting rotating collection from toolbar 2016-03-23 18:02:03 +00:00
search_indexes.inc Bug 9368 [ALTERNATE] - specific behavior of yr and acqdate indexes 2014-10-22 15:16:55 -03:00
serials-menu.inc Bug 10855: Search subscriptions by additional fields 2015-10-02 15:10:30 -03:00
serials-search.inc Bug 15706: Changing to circulate_remaining_permissions 2016-02-23 22:38:46 +00:00
serials-toolbar.inc Bug 14915: (QA followup) Tweak '+' icon for serials-home 2015-10-27 10:02:51 -03:00
slip-print.inc Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues 2016-02-11 19:39:53 +00:00
strings.inc Bug 14310 [QA Followup] - Deal with error conditions 2016-01-27 06:20:19 +00:00
subscriptions-search.inc Bug 10971: Hide EAN search for MARC21 / template corrections 2015-04-24 20:14:52 -03:00
subtypes_unimarc.inc Bug 11503: fix several typos 2014-01-13 20:47:03 +00:00
suggestions-add-search.inc Bug 15706: Changing to circulate_remaining_permissions 2016-02-23 22:38:46 +00:00
timepicker.inc Bug 11618: ensure jQuery timepicker is picked up by the i18n toolchain 2014-02-18 21:19:16 +00:00
tools-item-action.inc Bug 7131: teach MARC import how to overlay items 2013-10-30 04:31:07 +00:00
tools-menu.inc Bug 16030: Add 'Automatic item modifications by age' to the tool sidebar 2016-03-21 22:38:55 +00:00
tools-nomatch-action.inc
tools-overlay-action.inc
validator-strings.inc Bug 6209 follow-up, make strings translatable 2013-03-23 00:12:59 -04:00
vendor-menu.inc Bug 8913 [Revised] Improve acquisitions navigation 2013-02-20 09:17:21 -05:00
virtualshelves-toolbar.inc Bug 15453: Assign the correct shelfid to the download list links 2016-01-07 18:54:34 +00:00
wysiwyg-systempreferences.inc Bug 11584: Add wysiwyg editor to system preferences dealing with HTML 2015-08-28 10:28:50 -03:00
z3950-admin-search.inc Bug 15706: Changing to circulate_remaining_permissions 2016-02-23 22:38:46 +00:00