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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt (+1 lines)
Lines 409-414 Link Here
409
        [% END %]
409
        [% END %]
410
410
411
        <input type="hidden" id="redirect" name="redirect" value="" />
411
        <input type="hidden" id="redirect" name="redirect" value="" />
412
        <input type="hidden" id="section" name="section" value="[% section | html %]" />
412
        <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
413
        <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
413
    </form>
414
    </form>
414
[% END %]
415
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/letter.js (-1 / +13 lines)
Lines 136-142 $(document).ready(function() { Link Here
136
        }
136
        }
137
    });
137
    });
138
138
139
    $( ".transport-types" ).accordion({ collapsible: true, active:false, animate: 200 });
139
    $( ".transport-types" ).accordion({
140
        collapsible: true,
141
        active: parseInt( $("#section").val(), 10),
142
        animate: 200,
143
        activate: function() {
144
            var active = $( ".transport-types" ).accordion( "option", "active" );
145
            if( active === false ){
146
                $("#section").val("");
147
            } else {
148
                $("#section").val( active );
149
            }
150
        }
151
    });
140
152
141
    $(".insert").on("click",function(){
153
    $(".insert").on("click",function(){
142
        var containerid = $(this).data("containerid");
154
        var containerid = $(this).data("containerid");
(-)a/tools/letter.pl (-3 / +5 lines)
Lines 66-72 my $code = $input->param('code'); Link Here
66
my $module      = $input->param('module') || '';
66
my $module      = $input->param('module') || '';
67
my $content     = $input->param('content');
67
my $content     = $input->param('content');
68
my $op          = $input->param('op') || '';
68
my $op          = $input->param('op') || '';
69
my $redirect      = $input->param('redirect');
69
my $redirect    = $input->param('redirect');
70
my $section     = $input->param('section');
71
70
my $dbh = C4::Context->dbh;
72
my $dbh = C4::Context->dbh;
71
73
72
our ( $template, $borrowernumber, $cookie, $staffflags ) = get_template_and_user(
74
our ( $template, $borrowernumber, $cookie, $staffflags ) = get_template_and_user(
Lines 90-102 $template->param( Link Here
90
	script_name => $script_name,
92
	script_name => $script_name,
91
  searchfield => $searchfield,
93
  searchfield => $searchfield,
92
    branchcode => $branchcode,
94
    branchcode => $branchcode,
95
    section => $section,
93
	action => $script_name
96
	action => $script_name
94
);
97
);
95
98
96
if ( $op eq 'add_validate' or $op eq 'copy_validate' ) {
99
if ( $op eq 'add_validate' or $op eq 'copy_validate' ) {
97
    add_validate();
100
    add_validate();
98
    if( $redirect eq "just_save" ){
101
    if( $redirect eq "just_save" ){
99
        print $input->redirect("/cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=$branchcode&module=$module&code=$code&redirect=done");
102
        print $input->redirect("/cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=$branchcode&module=$module&code=$code&redirect=done&section=$section");
100
        exit;
103
        exit;
101
    } else {
104
    } else {
102
        $op = q{}; # we return to the default screen for the next operation
105
        $op = q{}; # we return to the default screen for the next operation
103
- 

Return to bug 23278