View | Details | Raw Unified | Return to bug 23594
Collapse All | Expand All

(-)a/suggestion/suggestion.pl (-16 / +21 lines)
Lines 246-270 elsif ($op eq "update_status" ) { Link Here
246
        $suggestion->{suggestionid} = $suggestionid;
246
        $suggestion->{suggestionid} = $suggestionid;
247
        &ModSuggestion($suggestion);
247
        &ModSuggestion($suggestion);
248
    }
248
    }
249
    my $params = '';
249
    redirect_with_params($input);
250
    foreach my $key (
251
        qw(
252
        displayby branchcode title author isbn publishercode copyrightdate
253
        collectiontitle suggestedby suggesteddate_from suggesteddate_to
254
        manageddate_from manageddate_to accepteddate_from
255
        accepteddate_to budgetid
256
        )
257
      )
258
    {
259
        $params .= $key . '=' . uri_escape($input->param($key)) . '&'
260
          if defined($input->param($key));
261
    }
262
    print $input->redirect("/cgi-bin/koha/suggestion/suggestion.pl?$params");
263
}elsif ($op eq "delete" ) {
250
}elsif ($op eq "delete" ) {
264
    foreach my $delete_field (@editsuggestions) {
251
    foreach my $delete_field (@editsuggestions) {
265
        &DelSuggestion( $borrowernumber, $delete_field,'intranet' );
252
        &DelSuggestion( $borrowernumber, $delete_field,'intranet' );
266
    }
253
    }
267
    $op = 'else';
254
    redirect_with_params($input);
268
}
255
}
269
elsif ( $op eq 'update_itemtype' ) {
256
elsif ( $op eq 'update_itemtype' ) {
270
    my $new_itemtype = $input->param('suggestion_itemtype');
257
    my $new_itemtype = $input->param('suggestion_itemtype');
Lines 272-277 elsif ( $op eq 'update_itemtype' ) { Link Here
272
        next unless $suggestionid;
259
        next unless $suggestionid;
273
        &ModSuggestion({ suggestionid => $suggestionid, itemtype => $new_itemtype });
260
        &ModSuggestion({ suggestionid => $suggestionid, itemtype => $new_itemtype });
274
    }
261
    }
262
    redirect_with_params($input);
275
}
263
}
276
elsif ( $op eq 'show' ) {
264
elsif ( $op eq 'show' ) {
277
    $suggestion_ref=&GetSuggestion($$suggestion_ref{'suggestionid'});
265
    $suggestion_ref=&GetSuggestion($$suggestion_ref{'suggestionid'});
Lines 428-430 $template->param( Link Here
428
    SuggestionStatuses       => GetAuthorisedValues('SUGGEST_STATUS'),
416
    SuggestionStatuses       => GetAuthorisedValues('SUGGEST_STATUS'),
429
);
417
);
430
output_html_with_http_headers $input, $cookie, $template->output;
418
output_html_with_http_headers $input, $cookie, $template->output;
431
- 
419
420
sub redirect_with_params {
421
    my ( $input ) = @_;
422
    my $params = '';
423
    foreach my $key (
424
        qw(
425
        displayby branchcode title author isbn publishercode copyrightdate
426
        collectiontitle suggestedby suggesteddate_from suggesteddate_to
427
        manageddate_from manageddate_to accepteddate_from
428
        accepteddate_to budgetid
429
        )
430
      )
431
    {
432
        $params .= $key . '=' . uri_escape(scalar $input->param($key)) . '&'
433
          if defined($input->param($key));
434
    }
435
    print $input->redirect("/cgi-bin/koha/suggestion/suggestion.pl?$params");
436
}

Return to bug 23594