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

(-)a/cataloguing/additem.pl (-1 / +3 lines)
Lines 635-641 if ($op eq "additem") { Link Here
635
    # check that there is no issue on this item before deletion.
635
    # check that there is no issue on this item before deletion.
636
    $error = &DelItemCheck( $biblionumber,$itemnumber);
636
    $error = &DelItemCheck( $biblionumber,$itemnumber);
637
    if($error == 1){
637
    if($error == 1){
638
        print $input->redirect("additem.pl?biblionumber=$biblionumber&frameworkcode=$frameworkcode&searchid=$searchid");
638
        print $input->redirect("additem.pl?biblionumber=$biblionumber&frameworkcode=$frameworkcode&searchid=$searchid&last_action=delitem");
639
    }else{
639
    }else{
640
        push @errors,$error;
640
        push @errors,$error;
641
        $nextop="additem";
641
        $nextop="additem";
Lines 926-931 $template->param( Link Here
926
    barcode          => GetBarcodeFromItemnumber($itemnumber),
926
    barcode          => GetBarcodeFromItemnumber($itemnumber),
927
    itemtagfield     => $itemtagfield,
927
    itemtagfield     => $itemtagfield,
928
    itemtagsubfield  => $itemtagsubfield,
928
    itemtagsubfield  => $itemtagsubfield,
929
    # last_action determines focus on form
930
    last_action      => $op // $input->param('last_action') // '',
929
    op      => $nextop,
931
    op      => $nextop,
930
    opisadd => ($nextop eq "saveitem") ? 0 : 1,
932
    opisadd => ($nextop eq "saveitem") ? 0 : 1,
931
    popup => scalar $input->param('popup') ? 1: 0,
933
    popup => scalar $input->param('popup') ? 1: 0,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-1 / +7 lines)
Lines 82-87 $(document).ready(function(){ Link Here
82
        addSingleBlock.toggle();
82
        addSingleBlock.toggle();
83
        multiCopyControl.toggle();
83
        multiCopyControl.toggle();
84
    });
84
    });
85
    [% IF last_action == "additem" || last_action == "saveitem" || last_action == "delitem" %]
86
        $("input:text:visible:first").focus();
87
    [% ELSE %]
88
        $("fieldset.rows input:visible:first").focus();
89
        // FIXME: The first input gets focus. Note that focus on the first
90
        // select does not show properly.
91
    [% END %]
85
});
92
});
86
93
87
function Check(f) {
94
function Check(f) {
88
- 

Return to bug 17566