Lines 83-91
if ( $op eq 'new' ) {
Link Here
|
83 |
my $delete = $rec ? $rec->delete : undef; |
83 |
my $delete = $rec ? $rec->delete : undef; |
84 |
#TODO Improve error handling |
84 |
#TODO Improve error handling |
85 |
my $msg = $delete |
85 |
my $msg = $delete |
86 |
? JSON::to_json({ $fn => 6 }) |
86 |
? JSON::to_json({ $fn => { code => 6 }}) |
87 |
: $id |
87 |
: $id |
88 |
? JSON::to_json({ $fn || $id, 7 }) |
88 |
? JSON::to_json({ $fn || $id, { code => 7 }}) |
89 |
: ''; |
89 |
: ''; |
90 |
$template->param( |
90 |
$template->param( |
91 |
mode => 'deleted', |
91 |
mode => 'deleted', |
Lines 100-106
if ( $op eq 'new' ) {
Link Here
|
100 |
if ( !$rec || !$fh ) { |
100 |
if ( !$rec || !$fh ) { |
101 |
$template->param( |
101 |
$template->param( |
102 |
mode => 'new', |
102 |
mode => 'new', |
103 |
msg => JSON::to_json( { $id => 5 } ), |
103 |
msg => JSON::to_json({ $id => { code => 5 }}), |
104 |
); |
104 |
); |
105 |
output_html_with_http_headers $input, $cookie, $template->output; |
105 |
output_html_with_http_headers $input, $cookie, $template->output; |
106 |
} else { |
106 |
} else { |
107 |
- |
|
|