]> git.koha-community.org Git - koha.git/commit
Bug 35044: Preparation:
authorPedro Amorim <pedro.amorim@ptfs-europe.com>
Fri, 13 Oct 2023 09:58:17 +0000 (09:58 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 23 Aug 2024 16:21:21 +0000 (18:21 +0200)
commit410654387e2efe5355d98264b89eee2ce08e314b
treef7a3c2de0f58e4d49568c6d1ecd032b81a479f61
parente4ce13c945dcdad5d9e02b7684f75a47978f9be1
Bug 35044: Preparation:

get_additional_field_values_for_template method

New method to be utilized for retrieval of additional fields of any
class that implements it.
This is to be used when additional_fields are needed to be sent to .tt
files for renderering. Both for form entries and read-only 'show' pages.

Template files:

Updated additional-fields-entry.inc:
Now considers entry of repeatable fields.
Repeatable text fields will have a "+New" link to allow for adding of a
new instance of a repeatable field.
Repeatable AV fields will be shown as checkboxes instead of a dropdown

Update additional-fields-display.inc
When displaying non-editable additional-fields, multiple instances for
each field are now considered.
Label now only shows if field has a non-null value in it.
Option to show value_only
Option to set if its to be displayed on a table cell

Update histsearch.tt and filter-orders.inc
Now calls additional-fields-entry.inc with search_form=1 to prevent
repetable "+New" controls from showing on search inputs.

additional-fields-entry.js
New JS asset to be called by template files who require
additional-fields-entry.inc for repeatable fields controls.
This also handles the need for having the marcfield of type
'get' submitted if it is a disabled dropdown (AV marc field)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Koha/Object/Mixin/AdditionalFields.pm
koha-tmpl/intranet-tmpl/prog/en/includes/additional-fields-display.inc
koha-tmpl/intranet-tmpl/prog/en/includes/additional-fields-entry.inc
koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt
koha-tmpl/intranet-tmpl/prog/js/additional-fields-entry.js [new file with mode: 0644]