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

(-)a/admin/edi_ean_accounts.pl (-19 / +6 lines)
Lines 103-115 $template->param( Link Here
103
output_html_with_http_headers( $input, $cookie, $template->output );
103
output_html_with_http_headers( $input, $cookie, $template->output );
104
104
105
sub delsubmit {
105
sub delsubmit {
106
    my $ean = $schema->resultset('EdifactEan')->find(
106
    my $id = $input->param('id');
107
        {
107
    my $e = $schema->resultset('EdifactEan')->find( $id );
108
            branchcode => $input->param('branchcode'),
108
    $e->delete if $e;
109
            ean        => $input->param('ean')
110
        }
111
    );
112
    $ean->delete;
113
    return;
109
    return;
114
}
110
}
115
111
Lines 128-134 sub addsubmit { Link Here
128
}
124
}
129
125
130
sub editsubmit {
126
sub editsubmit {
131
    warn "DESC: " . $input->param('description');
132
    $schema->resultset('EdifactEan')->search(
127
    $schema->resultset('EdifactEan')->search(
133
        {
128
        {
134
            branchcode => $input->param('oldbranchcode'),
129
            branchcode => $input->param('oldbranchcode'),
Lines 146-161 sub editsubmit { Link Here
146
}
141
}
147
142
148
sub show_ean {
143
sub show_ean {
149
    my $branchcode = $input->param('branchcode');
144
    my $id = $input->param('id');
150
    my $ean        = $input->param('ean');
145
    my $e = $schema->resultset('EdifactEan')->find( $id );
151
    if ( $branchcode && $ean ) {
146
    $template->param( ean => $e );
152
        my $e = $schema->resultset('EdifactEan')->find(
153
            {
154
                ean        => $ean,
155
                branchcode => $branchcode,
156
            }
157
        );
158
        $template->param( ean => $e );
159
    }
160
    return;
147
    return;
161
}
148
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_ean_accounts.tt (-4 / +2 lines)
Lines 117-124 Link Here
117
<h3>Delete EAN [% ean.ean %] for [% ean.branch.branchname %]?</h3>
117
<h3>Delete EAN [% ean.ean %] for [% ean.branch.branchname %]?</h3>
118
<form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" method="post">
118
<form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" method="post">
119
    <input type="hidden" name="op" value="delete_confirmed" />
119
    <input type="hidden" name="op" value="delete_confirmed" />
120
    <input type="hidden" name="branchcode" value="[% ean.branch.branchcode %]" />
120
    <input type="hidden" name="id" value="[% ean.ee_id %]" />
121
    <input type="hidden" name="ean" value="[% ean.ean %]" />
122
    <input type="submit" class="approve" value="Yes, Delete" />
121
    <input type="submit" class="approve" value="Yes, Delete" />
123
</form>
122
</form>
124
<form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" method="get">
123
<form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" method="get">
Lines 152-158 Link Here
152
                <td align="center">
151
                <td align="center">
153
                    <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=ean_form&branchcode=[% ean.branch.branchcode %]&ean=[% ean.ean %]">Edit</a>
152
                    <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=ean_form&branchcode=[% ean.branch.branchcode %]&ean=[% ean.ean %]">Edit</a>
154
                    |
153
                    |
155
                    <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=delete_confirm&branchcode=[% ean.branch.branchcode %]&ean=[% ean.ean %]">Delete</a>
154
                    <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=delete_confirm&id=[% ean.id %]">Delete</a>
156
                </td>
155
                </td>
157
            </tr>
156
            </tr>
158
        [% END %]
157
        [% END %]
159
- 

Return to bug 16208