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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt (-1 / +1 lines)
Lines 57-63 Link Here
57
                                        </li>
57
                                        </li>
58
                                        [% IF ( branchloop ) %]
58
                                        [% IF ( branchloop ) %]
59
                                            <li><label for="branch">Library:</label>
59
                                            <li><label for="branch">Library:</label>
60
                                                <select name="branch" id="branch">
60
                                                <select name="branchcode" id="branch">
61
                                                    [% FOREACH branchloo IN branchloop %]
61
                                                    [% FOREACH branchloo IN branchloop %]
62
                                                        [% IF ( branchloo.selected ) %]
62
                                                        [% IF ( branchloo.selected ) %]
63
                                                            <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
63
                                                            <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
(-)a/opac/opac-suggestions.pl (-4 / +3 lines)
Lines 94-100 if ( $op eq "add_confirm" ) { Link Here
94
		    $suggestion->{$suggest} = $scrubber->scrub($suggestion->{$suggest});
94
		    $suggestion->{$suggest} = $scrubber->scrub($suggestion->{$suggest});
95
		}
95
		}
96
        $suggestion->{suggesteddate} = dt_from_string;
96
        $suggestion->{suggesteddate} = dt_from_string;
97
		$$suggestion{'branchcode'}= $input->param('branch') || C4::Context->userenv->{"branch"};
97
        $suggestion->{branchcode} = $input->param('branchcode') || C4::Context->userenv->{"branch"};
98
98
99
		&NewSuggestion($suggestion);
99
		&NewSuggestion($suggestion);
100
		# empty fields, to avoid filter in "SearchSuggestion"
100
		# empty fields, to avoid filter in "SearchSuggestion"
Lines 149-158 if ( C4::Context->preference("AllowPurchaseSuggestionBranchChoice") ) { Link Here
149
    if (C4::Context->userenv && C4::Context->userenv->{'branch'}) {
149
    if (C4::Context->userenv && C4::Context->userenv->{'branch'}) {
150
        $userbranch = C4::Context->userenv->{'branch'};
150
        $userbranch = C4::Context->userenv->{'branch'};
151
    }
151
    }
152
    my $branch = $input->param('branch') || $borr->{'branchcode'} || $userbranch || '' ;
152
    my $branchcode = $input->param('branchcode') || $borr->{'branchcode'} || $userbranch || '' ;
153
153
154
# make branch selection options...
154
# make branch selection options...
155
    my $branchloop = GetBranchesLoop($branch);
155
    my $branchloop = GetBranchesLoop($branchcode);
156
    $template->param( branchloop => $branchloop );
156
    $template->param( branchloop => $branchloop );
157
}
157
}
158
158
159
- 

Return to bug 13329