|
Lines 1-24
Link Here
|
| 1 |
#!/usr/bin/perl |
1 |
#!/usr/bin/perl |
| 2 |
# |
2 |
# |
| 3 |
# Copyright 2013 Jesse Weaver |
|
|
| 4 |
# |
| 5 |
# This file is part of Koha. |
3 |
# This file is part of Koha. |
| 6 |
# |
4 |
# |
| 7 |
# Koha is free software; you can redistribute it and/or modify it under the |
5 |
# Copyright 2013 Jesse Weaver |
| 8 |
# terms of the GNU General Public License as published by the Free Software |
6 |
# |
| 9 |
# Foundation; either version 2 of the License, or (at your option) any later |
7 |
# Koha is free software; you can redistribute it and/or modify it |
| 10 |
# version. |
8 |
# under the terms of the GNU General Public License as published by |
|
|
9 |
# the Free Software Foundation; either version 3 of the License, or |
| 10 |
# (at your option) any later version. |
| 11 |
# |
11 |
# |
| 12 |
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY |
12 |
# Koha is distributed in the hope that it will be useful, but |
| 13 |
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
13 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
# A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
14 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
15 |
# GNU General Public License for more details. |
| 15 |
# |
16 |
# |
| 16 |
# You should have received a copy of the GNU General Public License along |
17 |
# You should have received a copy of the GNU General Public License |
| 17 |
# with Koha; if not, write to the Free Software Foundation, Inc., |
18 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
| 18 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
|
|
| 19 |
# |
19 |
# |
| 20 |
|
20 |
|
| 21 |
use Modern::Perl '2010'; |
21 |
use Modern::Perl; |
| 22 |
|
22 |
|
| 23 |
use CGI; |
23 |
use CGI; |
| 24 |
|
24 |
|
|
Lines 43-54
our ( $template, $loggedinuser, $cookie ) = get_template_and_user( {
Link Here
|
| 43 |
our $op = $input->param( 'op' ) // 'show'; |
43 |
our $op = $input->param( 'op' ) // 'show'; |
| 44 |
$template->{VARS}->{op} = $op; |
44 |
$template->{VARS}->{op} = $op; |
| 45 |
|
45 |
|
| 46 |
given ( $op ) { |
46 |
if ( $op eq 'show' ) { |
| 47 |
when ( 'show' ) { show_external_targets(); } |
47 |
show_external_targets(); |
| 48 |
when ( 'add' ) { show_edit_form(); } |
48 |
} elsif ( $op eq 'add' ) { |
| 49 |
when ( 'edit' ) { show_edit_form(); } |
49 |
show_edit_form(); |
| 50 |
when ( 'save' ) { save_target(); } |
50 |
} elsif ( $op eq 'edit' ) { |
| 51 |
when ( 'delete' ) { delete_target(); } |
51 |
show_edit_form(); |
|
|
52 |
} elsif ( $op eq 'save' ) { |
| 53 |
save_target(); |
| 54 |
} elsif ( $op eq 'delete' ) { |
| 55 |
delete_target(); |
| 52 |
} |
56 |
} |
| 53 |
|
57 |
|
| 54 |
output_html_with_http_headers $input, $cookie, $template->output; |
58 |
output_html_with_http_headers $input, $cookie, $template->output; |