|
Lines 26-32
use C4::Koha;
Link Here
|
| 26 |
|
26 |
|
| 27 |
use Koha::Authority::Types; |
27 |
use Koha::Authority::Types; |
| 28 |
use Koha::AuthorisedValues; |
28 |
use Koha::AuthorisedValues; |
| 29 |
use Koha::AuthSubfieldStructures; |
29 |
use Koha::Authority::Subfields; |
| 30 |
|
30 |
|
| 31 |
use List::MoreUtils qw( uniq ); |
31 |
use List::MoreUtils qw( uniq ); |
| 32 |
|
32 |
|
|
Lines 104-110
if ($op eq 'add_form') {
Link Here
|
| 104 |
closedir DIR; |
104 |
closedir DIR; |
| 105 |
|
105 |
|
| 106 |
my @loop_data; |
106 |
my @loop_data; |
| 107 |
my $asses = Koha::AuthSubfieldStructures->search({ tagfield => $tagfield, authtypecode => $authtypecode}, {order_by => 'display_order'})->unblessed; |
107 |
my $asses = Koha::Authority::Subfields->search({ tagfield => $tagfield, authtypecode => $authtypecode}, {order_by => 'display_order'})->unblessed; |
| 108 |
my $i; |
108 |
my $i; |
| 109 |
for my $ass ( @$asses ) { |
109 |
for my $ass ( @$asses ) { |
| 110 |
my %row_data = %$ass; |
110 |
my %row_data = %$ass; |
|
Lines 181-187
if ($op eq 'add_form') {
Link Here
|
| 181 |
my $hidden = $ohidden[$i]; #collate from 3 hiddens; |
181 |
my $hidden = $ohidden[$i]; #collate from 3 hiddens; |
| 182 |
my $isurl = $input->param("isurl$i")?1:0; |
182 |
my $isurl = $input->param("isurl$i")?1:0; |
| 183 |
if ($liblibrarian) { |
183 |
if ($liblibrarian) { |
| 184 |
my $ass = Koha::AuthSubfieldStructures->find( |
184 |
my $ass = Koha::Authority::Subfields->find( |
| 185 |
{ |
185 |
{ |
| 186 |
authtypecode => $authtypecode, |
186 |
authtypecode => $authtypecode, |
| 187 |
tagfield => $tagfield, |
187 |
tagfield => $tagfield, |
|
Lines 209-215
if ($op eq 'add_form') {
Link Here
|
| 209 |
$ass->update($attributes); |
209 |
$ass->update($attributes); |
| 210 |
} |
210 |
} |
| 211 |
else { |
211 |
else { |
| 212 |
Koha::AuthSubfieldStructure->new( |
212 |
Koha::Authority::Subfield->new( |
| 213 |
{ |
213 |
{ |
| 214 |
authtypecode => $authtypecode, |
214 |
authtypecode => $authtypecode, |
| 215 |
tagfield => $tagfield, |
215 |
tagfield => $tagfield, |
|
Lines 229-235
if ($op eq 'add_form') {
Link Here
|
| 229 |
# called by default form, used to confirm deletion of data in DB |
229 |
# called by default form, used to confirm deletion of data in DB |
| 230 |
} |
230 |
} |
| 231 |
elsif ( $op eq 'delete_confirm' ) { |
231 |
elsif ( $op eq 'delete_confirm' ) { |
| 232 |
my $ass = Koha::AuthSubfieldStructures->find( |
232 |
my $ass = Koha::Authority::Subfields->find( |
| 233 |
{ |
233 |
{ |
| 234 |
authtypecode => $authtypecode, |
234 |
authtypecode => $authtypecode, |
| 235 |
tagfield => $tagfield, |
235 |
tagfield => $tagfield, |
|
Lines 242-248
elsif ( $op eq 'delete_confirm' ) {
Link Here
|
| 242 |
); |
242 |
); |
| 243 |
} |
243 |
} |
| 244 |
elsif ( $op eq 'delete_confirmed' ) { |
244 |
elsif ( $op eq 'delete_confirmed' ) { |
| 245 |
Koha::AuthSubfieldStructures->find( |
245 |
Koha::Authority::Subfields->find( |
| 246 |
{ |
246 |
{ |
| 247 |
authtypecode => $authtypecode, |
247 |
authtypecode => $authtypecode, |
| 248 |
tagfield => $tagfield, |
248 |
tagfield => $tagfield, |
|
Lines 253-259
elsif ( $op eq 'delete_confirmed' ) {
Link Here
|
| 253 |
exit; |
253 |
exit; |
| 254 |
} |
254 |
} |
| 255 |
else { # DEFAULT |
255 |
else { # DEFAULT |
| 256 |
my $ass = Koha::AuthSubfieldStructures->search( |
256 |
my $ass = Koha::Authority::Subfields->search( |
| 257 |
{ |
257 |
{ |
| 258 |
tagfield => { -like => "$tagfield%" }, |
258 |
tagfield => { -like => "$tagfield%" }, |
| 259 |
authtypecode => $authtypecode, |
259 |
authtypecode => $authtypecode, |
| 260 |
- |
|
|