# Parts Copyright 2009 Foundations Bible College.
#
# This file is part of Koha.
-#
+#
# Koha is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
use C4::Auth qw(get_template_and_user);
use C4::Output qw(output_html_with_http_headers);
-use C4::Labels::Lib 1.000000 qw(get_all_templates get_unit_values);
+use C4::Creators::Lib 1.000000 qw(get_all_templates get_unit_values);
use C4::Labels::Profile 1.000000;
my $cgi = new CGI;
if ($op eq 'edit') {
$profile = C4::Labels::Profile->retrieve(profile_id => $profile_id);
- $template_list = get_all_templates(field_list => 'template_id,template_code, profile_id');
+ $template_list = get_all_templates(table_name => 'creator_templates', field_list => 'template_id,template_code, profile_id');
}
elsif ($op eq 'save') {
my @params = (
}
if ($profile_id) {
- @label_template = grep{($_->{'profile_id'} == $profile->get_attr('profile_id')) && ($_->{'template_id'} == $profile->get_attr('template_id'))} @$template_list;
+ @label_template = grep {
+ ($_->{'profile_id'} == $profile->get_attr('profile_id')) && ($_->{'template_id'} == $profile->get_attr('template_id'));
+ } @$template_list;
}
foreach my $unit (@$units) {