Test plan:
1) Apply the patch
2) Have set dateaccessioned plugin to an item subfield (it is set on 952$d by default)
3) Confirm the functionality of this plugin is same as before patch
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
# along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl;
-use C4::Biblio qw/GetMarcFromKohaField/;
use Koha::DateUtils;
my $builder = sub {
my $date = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
- # find the tag/subfield mapped to items.dateaccessioned
- my ($tag,$subfield) = GetMarcFromKohaField("items.dateaccessioned","");
- my $res = <<END_OF_JS;
-<script type="text/javascript">
-//<![CDATA[
-//
+ my $res = <<END_OF_JS;
+<script>
// from: cataloguing/value_builder/dateaccessioned.pl
function Focus$function_name(event) {
\$("#" + id).val("$date");
}
}
-//]]>
</script>
END_OF_JS
return $res;