Bug 34478: Manual fix - opac-shelves (WIP)
Share still needs attention, moved to "later" Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
e4c7f15c3f
commit
43e01c43f0
|
|
@ -247,7 +247,7 @@
|
|||
<span class="sep">|</span>
|
||||
<form method="post" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="op" value="cud-edit_form" />
|
||||
<input type="hidden" name="op" value="edit_form" />
|
||||
<input type="hidden" name="referer" value="view" />
|
||||
<input type='hidden' name='public' value='[% shelf.public | html %]' />
|
||||
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
|
||||
|
|
@ -556,7 +556,7 @@
|
|||
<span class="sep">|</span>
|
||||
<form method="post" action="/cgi-bin/koha/opac-shelves.pl" class="d-inline">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="op" value="cud-edit_form" />
|
||||
<input type="hidden" name="op" value="edit_form" />
|
||||
<input type="hidden" name="referer" value="view" />
|
||||
<input type="hidden" name="public" value="[% shelf.public | html %]" />
|
||||
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
|
||||
|
|
@ -766,11 +766,10 @@
|
|||
<td>[% s.lastmodified | $KohaDates %]</td>
|
||||
<td>
|
||||
[% IF s.can_be_managed( loggedinusernumber ) %]
|
||||
<form action="/cgi-bin/koha/opac-shelves.pl" method="post" class="d-inline">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline">
|
||||
<input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
|
||||
<input type="hidden" name="public" value="[% s.public | html %]" />
|
||||
<input type="hidden" name="op" value="cud-edit_form" />
|
||||
<input type="hidden" name="op" value="edit_form" />
|
||||
<input type="hidden" name="referer" value="list" />
|
||||
<button type="submit" class="btn btn-link editshelf"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</button>
|
||||
</form>
|
||||
|
|
@ -782,8 +781,7 @@
|
|||
<a href="/cgi-bin/koha/opac-shareshelf.pl?op=invite&shelfnumber=[% s.shelfnumber | uri %]" class="sharelist btn btn-link"><i class="fa fa-share" aria-hidden="true"></i> Share</a>
|
||||
[% END %]
|
||||
[% IF s.is_shared AND s.can_be_managed( loggedinusernumber ) %]
|
||||
<form action="/cgi-bin/koha/opac-shelves.pl" method="post" class="d-inline">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<form action="/cgi-bin/koha/opac-shelves.pl" method="get" class="d-inline">
|
||||
<input type="hidden" name="shelfnumber" value="[% s.shelfnumber | html %]" />
|
||||
<input type="hidden" name="public" value="0" />
|
||||
<input type="hidden" name="op" value="cud-transfer" />
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ my ( $shelf, $shelfnumber, @messages );
|
|||
if ( $op eq 'add_form' ) {
|
||||
# Only pass default
|
||||
$shelf = { allow_change_from_owner => 1 };
|
||||
} elsif ( $op eq 'cud-edit_form' ) {
|
||||
} elsif ( $op eq 'edit_form' ) {
|
||||
$shelfnumber = $query->param('shelfnumber');
|
||||
$shelf = Koha::Virtualshelves->find($shelfnumber);
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ if ( $op eq 'add_form' ) {
|
|||
|
||||
if ($@) {
|
||||
push @messages, { type => 'error', code => 'error_on_update' };
|
||||
$op = 'cud-edit_form';
|
||||
$op = 'edit_form';
|
||||
} else {
|
||||
push @messages, { type => 'message', code => 'success_on_update' };
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue