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 116-123 Link Here
116
<h3>Delete EAN [% ean.ean %] for [% ean.branch.branchname %]?</h3>
116
<h3>Delete EAN [% ean.ean %] for [% ean.branch.branchname %]?</h3>
117
<form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" method="post">
117
<form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" method="post">
118
    <input type="hidden" name="op" value="delete_confirmed" />
118
    <input type="hidden" name="op" value="delete_confirmed" />
119
    <input type="hidden" name="branchcode" value="[% ean.branch.branchcode %]" />
119
    <input type="hidden" name="ean" value="[% ean.id %]" />
120
    <input type="hidden" name="ean" value="[% ean.ean %]" />
121
    <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
120
    <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
122
</form>
121
</form>
123
<form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" method="get">
122
<form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" method="get">
Lines 151-157 Link Here
151
                </td>
150
                </td>
152
                <td class="actions">
151
                <td class="actions">
153
                    <a class="btn btn-mini" href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=ean_form&branchcode=[% ean.branch.branchcode %]&ean=[% ean.ean %]"><i class="fa fa-pencil"></i> Edit</a>
152
                    <a class="btn btn-mini" href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=ean_form&branchcode=[% ean.branch.branchcode %]&ean=[% ean.ean %]"><i class="fa fa-pencil"></i> Edit</a>
154
                    <a class="btn btn-mini" href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=delete_confirm&branchcode=[% ean.branch.branchcode %]&ean=[% ean.ean %]"><i class="fa fa-trash"></i> Delete</a>
153
                    <a class="btn btn-mini" href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=delete_confirm&ean=[% ean.id %]"><i class="fa fa-trash"></i> Delete</a>
155
                </td>
154
                </td>
156
            </tr>
155
            </tr>
157
        [% END %]
156
        [% END %]
158
- 

Return to bug 16208