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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt (-1 / +12 lines)
Lines 535-541 Link Here
535
                                                <th>
535
                                                <th>
536
                                                    <label for="suggesteddate">[% tp('purchase suggestion created by', 'Created by:') | html %]</label>
536
                                                    <label for="suggesteddate">[% tp('purchase suggestion created by', 'Created by:') | html %]</label>
537
                                                </th>
537
                                                </th>
538
                                                <td> <input type="text" id="suggesteddate" name="suggesteddate" class="flatpickr" size="10" maxlength="10" value="[% default_suggesteddate ? default_suggesteddate : suggestion.suggesteddate | html %]" /> [% INCLUDE 'date-format.inc' %] </td>
538
                                                <td>
539
                                                    <input
540
                                                        type="text"
541
                                                        id="suggesteddate"
542
                                                        name="suggesteddate"
543
                                                        class="flatpickr"
544
                                                        size="10"
545
                                                        maxlength="10"
546
                                                        value="[% default_suggesteddate ? default_suggesteddate : suggestion.suggesteddate | html %]"
547
                                                    />
548
                                                    [% INCLUDE 'date-format.inc' %]
549
                                                </td>
539
                                                <td id="tdsuggestedby">
550
                                                <td id="tdsuggestedby">
540
                                                    <input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestion.suggestedby | html %]" />
551
                                                    <input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestion.suggestedby | html %]" />
541
                                                    [% IF ( suggestion.suggester.borrowernumber ) %]
552
                                                    [% IF ( suggestion.suggester.borrowernumber ) %]
(-)a/suggestion/suggestion.pl (-9 / +7 lines)
Lines 99-105 my $columns = ' ' . join( ' ', $schema->source('Suggestion')->columns ) Link Here
99
my $suggestion_only = { map { $columns =~ / $_ / ? ( $_ => $suggestion_ref->{$_} ) : () } keys %$suggestion_ref };
99
my $suggestion_only = { map { $columns =~ / $_ / ? ( $_ => $suggestion_ref->{$_} ) : () } keys %$suggestion_ref };
100
$suggestion_only->{STATUS} = $suggestion_ref->{STATUS};
100
$suggestion_only->{STATUS} = $suggestion_ref->{STATUS};
101
101
102
    qw( suggestedbyme op displayby tabcode notify filter_archived koha_login_context auth_forwarded_hash password userid );
102
qw( suggestedbyme op displayby tabcode notify filter_archived koha_login_context auth_forwarded_hash password userid );
103
103
104
delete $suggestion_only->{branchcode} if $suggestion_only->{branchcode} eq '__ANY__';
104
delete $suggestion_only->{branchcode} if $suggestion_only->{branchcode} eq '__ANY__';
105
delete $suggestion_only->{budgetid}   if $suggestion_only->{budgetid} eq '__ANY__';
105
delete $suggestion_only->{budgetid}   if $suggestion_only->{budgetid} eq '__ANY__';
Lines 256-264 if ( $op =~ /cud-save/ ) { Link Here
256
} elsif ( $op eq 'add_form' ) {
256
} elsif ( $op eq 'add_form' ) {
257
257
258
    $template->param(
258
    $template->param(
259
            default_suggester => $librarian,
259
        default_suggester     => $librarian,
260
            default_suggesteddate      => dt_from_string,
260
        default_suggesteddate => dt_from_string,
261
            default_branch    => C4::Context->userenv->{"branch"},
261
        default_branch        => C4::Context->userenv->{"branch"},
262
    );
262
    );
263
    $op = 'save';
263
    $op = 'save';
264
} elsif ( $op eq 'edit_form' ) {
264
} elsif ( $op eq 'edit_form' ) {
Lines 272-280 if ( $op =~ /cud-save/ ) { Link Here
272
    }
272
    }
273
    $other_reason = 0 unless $stored_suggestion->reason;
273
    $other_reason = 0 unless $stored_suggestion->reason;
274
    $template->param(
274
    $template->param(
275
        other_reason         => $other_reason,
275
        other_reason        => $other_reason,
276
        default_manageddate  => dt_from_string,
276
        default_manageddate => dt_from_string,
277
        default_branch       => C4::Context->userenv->{"branch"},
277
        default_branch      => C4::Context->userenv->{"branch"},
278
    );
278
    );
279
    $op = 'save';
279
    $op = 'save';
280
} elsif ( $op eq "cud-update_status" ) {
280
} elsif ( $op eq "cud-update_status" ) {
Lines 498-504 $template->param( Link Here
498
    reasonsloop     => $reasonsloop,
498
    reasonsloop     => $reasonsloop,
499
);
499
);
500
500
501
502
if ( defined($returnsuggested) and $returnsuggested ne "no_one" ) {
501
if ( defined($returnsuggested) and $returnsuggested ne "no_one" ) {
503
    print $input->redirect( "/cgi-bin/koha/members/moremember.pl?borrowernumber=" . $returnsuggested . "#suggestions" );
502
    print $input->redirect( "/cgi-bin/koha/members/moremember.pl?borrowernumber=" . $returnsuggested . "#suggestions" );
504
}
503
}
505
- 

Return to bug 39721