Bug 34478: Changes for offline_circ
Removed an unused form from process_koc.tt and an unused op from process_koc.pl. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
bb1e48267e
commit
e4abc27635
3 changed files with 6 additions and 12 deletions
|
@ -72,6 +72,7 @@
|
|||
<div id="fileuploadform">
|
||||
<form method="post" action="/cgi-bin/koha/offline_circ/process_koc.pl" enctype="multipart/form-data" class="validated">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="op" value="cud-upload"/>
|
||||
<fieldset class="brief">
|
||||
<ol><li><label for="fileToUpload">Choose .koc file: </label>
|
||||
<input class="required" required="required" type="file" id="fileToUpload" size="50" name="fileToUpload" />
|
||||
|
@ -88,16 +89,10 @@
|
|||
|
||||
<form action="enqueue_koc.pl" id="processfile" method="post" enctype="multipart/form-data">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="op" value="cud-enqueue"/>
|
||||
<input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" />
|
||||
<input type="hidden" name="action" value="add_to_queue" />
|
||||
<input type="submit" value="Add to offline circulation queue" id="queueformsubmit" />
|
||||
</form>
|
||||
|
||||
<form action="process_koc.pl" id="enqueuefile" method="post" enctype="multipart/form-data">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" />
|
||||
<!-- <input type="submit" value="Apply directly" id="mainformsubmit" /> -->
|
||||
</form>
|
||||
[% END %]
|
||||
|
||||
|
||||
|
|
|
@ -46,12 +46,13 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({
|
|||
flagsrequired => { circulate => "circulate_remaining_permissions" },
|
||||
});
|
||||
|
||||
my $fileID=$query->param('uploadedfileid');
|
||||
my $fileID = $query->param('uploadedfileid');
|
||||
my $op = $query->param('op') // q{};
|
||||
|
||||
## 'Local' globals.
|
||||
our $dbh = C4::Context->dbh();
|
||||
|
||||
if ($fileID) {
|
||||
if ( $op eq 'cud-enqueue' && $fileID ) {
|
||||
my $upload = Koha::UploadedFiles->find($fileID);
|
||||
my $fh = $upload? $upload->file_handle: undef;
|
||||
my @input_lines = $fh? <$fh>: ();
|
||||
|
|
|
@ -57,9 +57,7 @@ my $sessionID = $cookies{'CGISESSID'}->value;
|
|||
our $dbh = C4::Context->dbh();
|
||||
our @output = (); ## For storing messages to be displayed to the user
|
||||
|
||||
if ( $op eq 'add_to_queue' ) {
|
||||
$template->param(transactions_loaded => 1);
|
||||
} elsif ($fileID) {
|
||||
if ( $op eq 'cud-upload' && $fileID ) {
|
||||
my $upload = Koha::UploadedFiles->find( $fileID );
|
||||
my $fh = $upload? $upload->file_handle: undef;
|
||||
my $filename = $upload? $upload->filename: undef;
|
||||
|
|
Loading…
Reference in a new issue